Skip to content

Query

Brine2D

Brine2D.ECS.Query Namespace

Classes
CachedEntityQuery<T1,T2,T3,T4> Cached query for entities with four components. Iterates the smallest pool and cross-resolves the remaining three.
CachedEntityQuery<T1,T2,T3> Cached query for entities with three components. Iterates the smallest pool and cross-resolves the remaining two.
CachedEntityQuery<T1,T2> Cached query for entities with two components. Cache is rebuilt by iterating the smaller pool and cross-resolving the second component.
CachedEntityQuery<T1> A cached query that maintains pre-resolved (Entity, Component) pairs for zero-overhead iteration. Automatically invalidates when entities gain or lose components. The cache rebuilds using pool-direct iteration, touching only entities with the queried components. Implements IDisposable; dispose when the owning system is removed mid-scene to stop receiving invalidation notifications and allow GC.
CachedEntityQueryBase Abstract base for cached entity queries. Holds shared state (world, options, filters) and implements invalidation, disposal, and filter matching once for all arities.
CachedEntityQueryBuilder<T1,T2,T3,T4> Builder for creating cached entity queries with four components.
CachedEntityQueryBuilder<T1,T2,T3> Builder for creating cached entity queries with three components.
CachedEntityQueryBuilder<T1,T2> Builder for creating cached entity queries with two components.
CachedEntityQueryBuilder<T1> Builder for creating cached entity queries with filtering criteria.
CachedEntityQueryBuilderBase<TSelf> Abstract base for cached query builders. Holds shared filter state and provides fluent methods that are identical across all arities. Subclasses only add Build() with the correct return type.
EntityProjection<TTuple> Lightweight read-only list that projects entities from a cached-query tuple list. Wraps the live System.Collections.Generic.List<> reference — no copy, no extra storage.
EntityQuery Represents an executable entity query with filtering criteria.
Structs
EntityFilterState Bundles the filter lists shared between EntityQuery and CachedEntityQueryBase so matching logic is written once. Lightweight struct wrapping existing list references; zero allocation.
Interfaces
ICachedQuery Internal interface for cached queries to receive invalidation notifications.