IJobChunk is a type of Job that iterates over a set of ArchetypeChunk instances.
public interface IJobChunk
Create and schedule an IJobChunk Job inside a JobComponentSystem. The Job component system calls the Execute function once for each EntityArchetype found by the EntityQuery used to schedule the Job.
To pass data to the Execute function beyond the parameters of the Execute() function, add public fields to the IJobChunk struct declaration and set those fields immediately before scheduling the Job. You must pass the component type information for any components that the Job reads or writes using a field of type, ArchetypeChunkComponentType<T>. Get this type information by calling the appropriate GetArchetypeChunkComponentType<T>(Boolean) function for the type of component.
For more information see Using IJobChunk.
Execute(ArchetypeChunk, Int32, Int32)
Implement the Execute() function to perform a unit of work on an ArchetypeChunk.
void Execute(ArchetypeChunk chunk, int chunkIndex, int firstEntityIndex)
The current chunk.
The index of the current chunk within the list of all chunks found by the Job's EntityQuery. Note that chunks are not processed in index order, except by chance.
The index of the first entity in the current chunk within the list of all entities in all the chunks found by the Job's EntityQuery.
The Job component system calls the Execute function once for each EntityArchetype found by the EntityQuery used to schedule the Job.