Skip to content

@modoki/engine / index / instantiatePrefabIntoWorld

Function: instantiatePrefabIntoWorld() ​

instantiatePrefabIntoWorld(world, prefab, parentId?, rootTransform?, source?, overrides?, structure?, _stack?, nestedOverrides?): number

Parameters ​

world ​

World

prefab ​

entities ​

PrefabFileEntry[]

id? ​

string

rootLocalId? ​

number

parentId? ​

number = 0

rootTransform? ​

Record<string, unknown>

source? ​

string

overrides? ​

Record<number, Record<string, Record<string, unknown>>>

structure? ​

InstanceStructureData

_stack? ​

Set<string>

nestedOverrides? ​

NestedOverridePaths

Overrides an OUTER layer (scene / ancestor prefab) applies to this instance's nested descendants, path-keyed so any depth is reachable; forwarded recursively as nested rows expand. Outermost layer wins (see NestedOverridePaths).

Returns ​

number

Built with Modoki.