Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AsyncInstantiateOperation

Asynchronous instantiate operation on UnityEngine.Object type.
Read time 1 minuteLast updated 4 days ago

Definition

public class AsyncInstantiateOperation : AsyncOperation

Remarks

The operation is used by Object.InstantiateAsync internally and usually wrapped by AsyncInstantiateOperation\<T\>.

Properties

Property

Description

ResultIf isDone is true, then Result contains the instantiated objects. The size of the array is the same as the 'count' argument for the InstantiateAsync call.

Methods

Method

Description

CancelMethod that cancels all the operations connected to the asynchronous instantiation if the operation is not done yet, that is, where isDone == false. This method deletes all the objects created so far, which are not visible to users while they're not activated, and stops all the internal jobs connected to the operation.
IsWaitingForSceneActivationThis property can be true only if allowSceneActivation is set to false, and if the operation has already completed everything needed for object instantiation except for the main thread integrating the objects and calling their Awake methods. Users can set allowSceneActivation to true to trigger the activation or call the Cancel method to cancel instantiation.
WaitForCompletionBlocks the current thread until this operation is done.

Static Methods

Method

Description

GetIntegrationTimeMSGets the target duration allowed per frame to integrate instantiated object operations, in milliseconds.
SetIntegrationTimeMSSets the target duration allowed per frame to integrate instantiated object operations, in milliseconds.

Inheritance