Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Creates a connected instance of an imported prefab in this loaded scene.

API: engine
Project: Inno.Scene

public Inno.Scene.GameObject Inno.Scene.GameScene.InstantiatePrefab(Inno.Scene.PrefabAsset prefab, Inno.Scene.Components.Transform? parent = null)

Parameter prefab: The prefab asset that supplies the object subtree.

Parameter parent: Optional parent for the new instance.

The newly instantiated prefab root.

Exception T:System.ArgumentNullException: The prefab is null.

Exception T:System.InvalidOperationException: The scene is not loaded in its owning world or prefab services are unavailable.