wave6-enabled-ref-rw-in-job
CommunityToggle enable bits in jobs instantly
System Documentation
What problem does it solve?
It solves the performance and timing issues of enabling/disabling entities in Unity DOTS by letting you read and write the enabled bit of an IEnableableComponent directly inside a job execution path, avoiding ECB overhead and the one-frame delay from deferred playback.
Core Features & Use Cases
- Inline enabled-bit reads/writes in IJobEntity: Use EnabledRefRW<T> to update the component enabled state within the same job pass.
- Correct query behavior with disabled entities: Ensure queries include disabled entities by using EntityQueryOptions.IgnoreComponentEnabledState when you intend to process both enabled and disabled targets.
- Same-frame bulk toggling: Apply proximity/LOD/range logic to bulk-enable or bulk-disable entities without structural changes or ECB playback.
Use case: you have thousands of entities and need proximity-based culling that turns an ActiveBehavior component on/off immediately within the same frame based on distance computed during the job.
Quick Start
Use EnabledRefRW<ActiveBehavior> inside an IJobEntity Execute method and add WithOptions(EntityQueryOptions.IgnoreComponentEnabledState) so the job can process both enabled and disabled entities in the same pass.
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: wave6-enabled-ref-rw-in-job Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#wave6-enabled-ref-rw-in-job 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.