예제 #1
0
 /// <summary>
 /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous.
 /// </summary>
 /// <param name="location">The location of the Object to instantiate.</param>
 /// <param name="parent">Parent transform for instantiated object.</param>
 /// <param name="instantiateInWorldSpace">Option to retain world space when instantiated with a parent.</param>
 /// <param name="trackHandle">If true, Addressables will track this request to allow it to be released via the result object.</param>
 /// <returns>The operation handle for the request.</returns>
 public static AsyncOperationHandle <GameObject> InstantiateAsync(IResourceLocation location, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true)
 {
     return(m_Addressables.InstantiateAsync(location, new InstantiationParameters(parent, instantiateInWorldSpace), trackHandle));
 }