Skip to content

TextStudio3DMenuFactory

ClassTextStudio.ThreeDTextStudio.3D
public static class TextStudio3DMenuFactory

Instantiates production spatial UI prefabs resolved through a caller-supplied library.

Instantiate(TextStudio3DMenuPrefabLibrary, TextStudio3DSpatialPrefabKind, Transform, bool)

Section titled “Instantiate(TextStudio3DMenuPrefabLibrary, TextStudio3DSpatialPrefabKind, Transform, bool)”
public static GameObject Instantiate(TextStudio3DMenuPrefabLibrary library, TextStudio3DSpatialPrefabKind kind, Transform parent = null, bool worldPositionStays = false)

Instantiates a prefab for the requested role and preserves its authored name.

Parameters

Name Type
library TextStudio.ThreeD.TextStudio3DMenuPrefabLibrary
kind TextStudio.ThreeD.TextStudio3DSpatialPrefabKind
parent UnityEngine.Transform
worldPositionStays System.Boolean

Returns

UnityEngine.GameObject: The new instance, or null when the library or role has no valid prefab.

Instantiate(TextStudio3DMenuPrefabLibrary, TextStudio3DSpatialPrefabKind, Transform, bool)

Section titled “Instantiate(TextStudio3DMenuPrefabLibrary, TextStudio3DSpatialPrefabKind, Transform, bool)”
public static T Instantiate<T>(TextStudio3DMenuPrefabLibrary library, TextStudio3DSpatialPrefabKind kind, Transform parent = null, bool worldPositionStays = false) where T : Component

Instantiates a prefab for the requested role and returns a component from its root.

Parameters

Name Type
library TextStudio.ThreeD.TextStudio3DMenuPrefabLibrary
kind TextStudio.ThreeD.TextStudio3DSpatialPrefabKind
parent UnityEngine.Transform
worldPositionStays System.Boolean

Returns

{T}: The requested component, or null when resolution, instantiation, or component lookup fails.