XII Release 0.1.0
Loading...
Searching...
No Matches
xiiScriptExtensionClass_Prefabs Class Reference

Script extension class providing prefab instantiation functionality for scripts. More...

#include <ScriptExtensionClass_Prefabs.h>

Static Public Member Functions

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)
 

Detailed Description

Script extension class providing prefab instantiation functionality for scripts.

Member Function Documentation

◆ SpawnPrefab()

xiiVariantArray xiiScriptExtensionClass_Prefabs::SpawnPrefab ( xiiWorld * pWorld,
xiiStringView sPrefab,
const xiiTransform & globalTransform,
xiiUInt32 uiUniqueID,
bool bSetCreatedByPrefab,
bool bSetHideShapeIcon )
static

Spawns a prefab instance at the specified global transform.

Parameters
sPrefabPath or name of the prefab to spawn.
globalTransformWorld position, rotation and scale for the prefab.
uiUniqueIDUnique identifier for deterministic spawning, use 0 for random.
bSetCreatedByPrefabWhether to mark spawned objects as created by prefab.
bSetHideShapeIconWhether 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()

xiiVariantArray xiiScriptExtensionClass_Prefabs::SpawnPrefabAsChild ( xiiWorld * pWorld,
xiiStringView sPrefab,
xiiGameObject * pParent,
const xiiTransform & localTransform,
xiiUInt32 uiUniqueID,
bool bSetCreatedByPrefab,
bool bSetHideShapeIcon )
static

Spawns a prefab instance as a child of the specified parent object.

Parameters
sPrefabPath or name of the prefab to spawn.
pParentParent game object for the spawned prefab.
localTransformLocal transform relative to the parent.
uiUniqueIDUnique identifier for deterministic spawning, use 0 for random.
bSetCreatedByPrefabWhether to mark spawned objects as created by prefab.
bSetHideShapeIconWhether 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: