Script extension class providing prefab instantiation functionality for scripts.
More...
#include <ScriptExtensionClass_Prefabs.h>
|
| static xiiVariantArray | SpawnPrefab (xiiWorld *pWorld, xiiStringView sPrefab, const xiiTransform &globalTransform, xiiUInt32 uiUniqueID, bool bSetCreatedByPrefab, bool bSetHideShapeIcon) |
| |
| static xiiVariantArray | SpawnPrefabAsChild (xiiWorld *pWorld, xiiStringView sPrefab, xiiGameObject *pParent, const xiiTransform &localTransform, xiiUInt32 uiUniqueID, bool bSetCreatedByPrefab, bool bSetHideShapeIcon) |
| |
Script extension class providing prefab instantiation functionality for scripts.
◆ SpawnPrefab()
Spawns a prefab instance at the specified global transform.
- Parameters
-
| sPrefab | Path or name of the prefab to spawn. |
| globalTransform | World position, rotation and scale for the prefab. |
| uiUniqueID | Unique identifier for deterministic spawning, use 0 for random. |
| bSetCreatedByPrefab | Whether to mark spawned objects as created by prefab. |
| bSetHideShapeIcon | Whether to hide shape icons in the editor for spawned objects. |
- Returns
- Array of game object handles for the spawned prefab's top-level objects.
◆ SpawnPrefabAsChild()
Spawns a prefab instance as a child of the specified parent object.
- Parameters
-
| sPrefab | Path or name of the prefab to spawn. |
| pParent | Parent game object for the spawned prefab. |
| localTransform | Local transform relative to the parent. |
| uiUniqueID | Unique identifier for deterministic spawning, use 0 for random. |
| bSetCreatedByPrefab | Whether to mark spawned objects as created by prefab. |
| bSetHideShapeIcon | Whether to hide shape icons in the editor for spawned objects. |
- Returns
- Array of game object handles for the spawned prefab's top-level objects.
The documentation for this class was generated from the following files:
- /home/runner/work/XII/XII/Source/Engine/Core/Scripting/ScriptClasses/ScriptExtensionClass_Prefabs.h
- /home/runner/work/XII/XII/Source/Engine/Core/Scripting/ScriptClasses/Implementation/ScriptExtensionClass_Prefabs.cpp