/// <summary> /// Method provided by the system for instantiating UI /// </summary> /// <param name="user">The functionality user</param> /// <param name="prefab">The prefab to instantiate</param> /// <param name="parent">(Optional) A parent transform to instantiate under</param> /// <param name="worldPositionStays">(Optional) If true, the parent-relative position, scale and rotation are modified</param> /// <param name="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.</param> /// <returns>The instantiated GameObject</returns> public static GameObject InstantiateUI(this IInstantiateUI user, GameObject prefab, Transform parent = null, bool worldPositionStays = true, Transform rayOrigin = null) { return(instantiateUI(prefab, parent, worldPositionStays, rayOrigin)); }
/// <summary> /// Method provided by the system for instantiating UI /// </summary> /// <param name="prefab">The prefab to instantiate</param> /// <param name="parent">(Optional) A parent transform to instantiate under</param> /// <param name="worldPositionStays">(Optional) If true, the parent-relative position, scale and rotation are modified /// such that the object keeps the same world space position, rotation and scale as before.</param> /// <returns></returns> public static GameObject InstantiateUI(this IInstantiateUI obj, GameObject prefab, Transform parent = null, bool worldPositionStays = true) { return(instantiateUI(prefab, parent, worldPositionStays)); }