CachedEntityQuery.ForEach(Action) Method
Definition¶
Namespace: Brine2D.ECS.Query
Executes an action for each cached entity and its component. Components are pre-resolved; no pool lookup occurs in the hot path. Automatically parallelizes when entity count exceeds ECSOptions.ParallelEntityThreshold.
public void ForEach(System.Action<Brine2D.ECS.Entity,T1> action);
Parameters¶
action System.Action<Entity,T1>
Remarks¶
\<b>Thread safety:\</b> When parallelized, the action delegate runs on multiple threads simultaneously. The caller is responsible for ensuring thread-safe access to any shared or mutable state, including component properties.