Entity.GetDescendants() Method
Definition
Namespace: Brine2D.ECS
Gets all descendant entities \(children, grandchildren, etc\.\) via iterative depth-first traversal.
Returns
System.Collections.Generic.IEnumerable<Entity>
Remarks
Allocates a System.Collections.Generic.Stack<> and yields each entity, so calling this in a hot loop \(e\.g\., every frame\) creates per-call garbage. Use CollectDescendants\(List<Entity>\) instead when you need a reusable buffer with zero per-call allocation.