/// <summary> /// Instantiate the referenced asset as type TObject. /// </summary> /// <typeparam name="TObject">The object type.</typeparam> /// <param name="parent">The parent of the instantiated object.</param> /// <param name="instantiateInWorldSpace">Option to retain world space when instantiated with a parent.</param> /// <returns></returns> public AsyncOperationHandle <GameObject> Instantiate(Transform parent = null, bool instantiateInWorldSpace = false) { return(Addressables.Instantiate(RuntimeKey, parent, instantiateInWorldSpace, true)); }
/// <summary> /// Instantiate the referenced asset as type TObject. /// </summary> /// <param name="position">Position of the instantiated object.</param> /// <param name="rotation">Rotation of the instantiated object.</param> /// <param name="parent">The parent of the instantiated object.</param> /// <returns></returns> public AsyncOperationHandle <GameObject> Instantiate(Vector3 position, Quaternion rotation, Transform parent = null) { return(Addressables.Instantiate(RuntimeKey, position, rotation, parent, true)); }