TextStudio3DMenuFactory
public static class TextStudio3DMenuFactoryInstantiates production spatial UI prefabs resolved through a caller-supplied library.
Methods
Section titled “Methods”
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 : ComponentInstantiates 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.