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

API: scripting
Project: Inno.Scene
Scope: Runtime

public InnoEngine.Scene.GameObject InnoEngine.Scene.GameScene.InstantiatePrefab(InnoEngine.Scene.PrefabAsset prefab, InnoEngine.Scene.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.