Method InstantiateUI
InstantiateUI(IInstantiateUI, GameObject, Transform, bool, Transform)
Method provided by the system for instantiating UI
Declaration
public static GameObject InstantiateUI(this IInstantiateUI user, GameObject prefab, Transform parent = null, bool worldPositionStays = true, Transform rayOrigin = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IInstantiateUI | user | The functionality user |
| GameObject | prefab | The prefab to instantiate |
| Transform | parent | (Optional) A parent transform to instantiate under |
| bool | worldPositionStays | (Optional) If true, the parent-relative position, scale and rotation are modified |
| Transform | rayOrigin | (Optional) RayOrigin override that will be used when connecting interfaces on this object such that the object keeps the same world space position, rotation and scale as before. |
Returns
| Type | Description |
|---|---|
| GameObject | The instantiated GameObject |