Skip to content

EntityQuery.OnlyEnabled() Method

Definition

Namespace: Brine2D.ECS.Query

Filters to entities where all required components have IsEnabled set to true. Only the components specified via .With<T>() are checked.

C#
public Brine2D.ECS.Query.EntityQuery OnlyEnabled();

Returns

EntityQuery

Remarks

This is distinct from OnlyActive(): OnlyActive() filters by IsActive \(entity\-level\), while OnlyEnabled() filters by IsEnabled \(component\-level\). Resolves each required component once per entity, so prefer CachedEntityQuery<T1> with OnlyEnabled() for per-frame queries where components are already pre-resolved.