CachedEntityQuery Class
Definition
Namespace: Brine2D.ECS.Query
Cached query for entities with four components. Iterates the smallest pool and cross-resolves the remaining three.
C#
public class CachedEntityQuery<T1,T2,T3,T4> : Brine2D.ECS.Query.CachedEntityQueryBase
where T1 : Brine2D.ECS.Component
where T2 : Brine2D.ECS.Component
where T3 : Brine2D.ECS.Component
where T4 : Brine2D.ECS.Component
Type parameters
T1
T2
T3
T4
Inheritance System.Object → CachedEntityQueryBase → CachedEntityQuery\<T1,T2,T3,T4>
| Methods | |
|---|---|
| Execute() | Executes the query and returns matching entities. The returned list is cached; no allocation occurs per call. |
| ForEach\(Action<Entity,T1,T2,T3,T4>\) | Executes an action for each cached entity and its components. Automatically parallelizes when entity count exceeds ECSOptions.ParallelEntityThreshold. |
| GetEnumerator() | Returns a struct enumerator over the cached \(Entity, C1, C2, C3, C4\) tuples. Use with foreach for zero-allocation iteration; no delegate or closure is created. |