What problem does it solve?
It solves the problem of correctly iterating Unity ECS chunks in parallel while handling enableable-component masks and accessing per-chunk/per-entity metadata deterministically.
Core Features & Use Cases
- Enableable-component mask correctness: Applies an explicit enableable-component mask via a chunk entity enumerator so disabled entities are not processed.
- Deterministic parallel ECB writes: Uses
unfilteredChunkIndex as the EntityCommandBuffer.ParallelWriter sort key to keep command playback order stable.
- Proper type handle management: Builds and uses
ComponentTypeHandle<T> values in the right place so stale handles don’t cause safety errors or incorrect behavior.
Use it when a system needs per-chunk details like unfilteredChunkIndex, DidChange, shared component values, or chunk headers, and when IJobEntity cannot express the required low-level behavior.
Quick Start
Implement an IJobChunk that reads required component type handles, iterates entities using a ChunkEntityEnumerator with useEnableMask and chunkEnabledMask, and schedules it with ScheduleParallel while using unfilteredChunkIndex for all Ecb.ParallelWriter operations.