IForEachEntity<T1..T9>
Like IForEach but also receives the Entity handle, built from the archetype's entity rows (id and version side by side) without a per-entity lookup.
public interface IForEachEntity<T1> where T1 : struct, IComponent
public interface IForEachEntity<T1, T2> where T1 : struct, IComponent where T2 : struct, IComponent
public interface IForEachEntity<T1, T2, T3> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent
public interface IForEachEntity<T1, T2, T3, T4> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent
public interface IForEachEntity<T1, T2, T3, T4, T5> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent
public interface IForEachEntity<T1, T2, T3, T4, T5, T6> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent
public interface IForEachEntity<T1, T2, T3, T4, T5, T6, T7> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent where T7 : struct, IComponent
public interface IForEachEntity<T1, T2, T3, T4, T5, T6, T7, T8> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent where T7 : struct, IComponent where T8 : struct, IComponent
public interface IForEachEntity<T1, T2, T3, T4, T5, T6, T7, T8, T9> where T1 : struct, IComponent where T2 : struct, IComponent where T3 : struct, IComponent where T4 : struct, IComponent where T5 : struct, IComponent where T6 : struct, IComponent where T7 : struct, IComponent where T8 : struct, IComponent where T9 : struct, IComponentOne type per number of components, 1 to 9 (generated from one template); the members below are those of each, shown for IForEachEntity<T1>.
Properties
Writes
static virtual int Writes { get; }Components the job writes through its refs: bit k - 1 for component k (default: all). When the job changes the archetype of the entity it visits, ForEach carries those components over from the row the refs point into to the entity's new row after the job returns. Generated jobs set only their ref parameters.
Methods
Execute
void Execute(Entity entity, ref T1 c1);One matching entity: its handle and its components, by reference.
Last updated on
How is this guide?
IForEachBatch<T1..T9>
Struct callback for World.ForEachBatch: receives whole runs of rows as spans, one per component, so the job can process them with SIMD…
IGroup
Marks a component whose value splits tables: in a world that called World.GroupBy, entities with different IGroup.Groups live in different tables…