direct-entity-manager-structural-changes
CommunityMake safe one-shot structural changes
Software Engineering#ecs#batch-operations#burst#safety-patterns#unity-dots#structural-changes#entitymanager
AuthordyCuong03
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It prevents unsafe or expensive Unity DOTS structural changes by guiding when and how to use EntityManager directly for one-shot, batch operations.
Core Features & Use Cases
- Main-thread batch structural changes: Use EntityManager outside active query iteration to initialize or respawn large sets efficiently (e.g., mass Instantiate, Add/Remove components, Destroy by query).
- Safety-first patterns: Avoid structural changes inside SystemAPI.Query foreach and avoid accessing EntityManager from scheduled jobs.
- Performance-oriented approach: Prefer batch overloads and one-shot system disabling to reduce archetype operations and eliminate per-frame duplication.
Quick Start
In a one-shot ISystem OnUpdate, disable the system with state.Enabled = false before work, then use state.EntityManager.Instantiate(prefab, count, Allocator.Temp) and apply component/buffer changes via batch or query-based APIs outside any query foreach loop.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: direct-entity-manager-structural-changes Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#direct-entity-manager-structural-changes Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.