Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / instantiateSubtree

Function: instantiateSubtree() ​

ts
function instantiateSubtree(
   world, 
   objectManagementSystem, 
   snapshot): InstantiateSubtreeResult;

Defined in: prefab/instantiateSubtree.ts:33

Hydrate a self-contained subtree snapshot (a prefab file's snapshot) into a LIVE world: fresh entity ids, internal references remapped, no camera promotion, transform pass scoped to the created entities.

Parameters ​

ParameterType
worldWorld
objectManagementSystemObjectManagementSystem
snapshotSubtreeSnapshot

Returns ​

InstantiateSubtreeResult