Skip to content

EntityWorld.GetEntitiesWithComponent() Method

Definition

Namespace: Brine2D.ECS

public System.Collections.Generic.IEnumerable<Brine2D.ECS.Entity> GetEntitiesWithComponent<T>()
    where T : Brine2D.ECS.Component;

Type parameters

T

Implements GetEntitiesWithComponent<T>()

Returns

System.Collections.Generic.IEnumerable<Entity>

Remarks

Returns a materialized list. For per-frame use in systems, prefer CreateCachedQuery<T1>(); cached queries rebuild only when components change and have zero per-frame allocation.