@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / collectEntitySubtree
Function: collectEntitySubtree() ​
ts
function collectEntitySubtree(world, rootIds): number[];Defined in: prefab/collectEntitySubtree.ts:11
Collect the given roots plus every descendant, BFS parent-first, using the ParentId component edges. Parent-first ordering matters: serialization renumbers ids in this order and instantiation creates entities in file order, so parents always exist before their children are linked.
Parameters ​
| Parameter | Type |
|---|---|
world | World |
rootIds | number[] |
Returns ​
number[]

