| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Captures a snapshot of the original object that's related to another GameObject and obtains an AsyncInstantiateOperation instance of the resulting objects.
The operation is mainly asynchronous, but the last stage involving integration and awake calls is executed on the main thread. The operation can be cancelled, or the integration stage can be delayed using allowSceneActivation.
It is possible to yield a return operation or call its WaitForCompletion() method to finish the operation in a synchronized way.
For extra control you can use the overrides that take an InstantiateParameters struct. This includes extra options like deciding between using local or world space, or to specify a target scene for the objects.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| parent | The Transform to set as the parent of the new object. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, sets parent as the parent of the clone, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| parent | The Transform to set as the parent of the new object. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, sets the parent, position, and rotation of the clone, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, sets the position and rotation of the clone, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
| parameters | An InstantiateParameters struct that specifies options for the new object, such as its parent, the scene to add it to, and whether to use world space. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, sets the position and rotation of the clone, applies the settings in parameters, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| parameters | An InstantiateParameters struct that specifies options for the new object, such as its parent, the scene to add it to, and whether to use world space. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, applies the settings in parameters, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| parameters | An InstantiateParameters struct that specifies options for the new object, such as its parent, the scene to add it to, and whether to use world space. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, applies the settings in parameters, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| parent | The Transform to set as the parent of the new object. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets parent as the parent of the clones, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| parent | The Transform to set as the parent of the new object. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the parent, position, and rotation of the clones, and returns an AsyncInstantiateOperation that you can cancel with cancellationToken.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| parent | The Transform to set as the parent of the new object. |
| positions | The read only span of positions for the new object or objects. The length of the span can be less than count, in which case Unity uses positions[i % positions.Length]. |
| rotations | The read only span of rotations for the new object or objects. The length of the span can be less than count, in which case Unity uses rotations[i % rotations.Length]. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the parent and the per-copy positions and rotations of the clones, and returns an AsyncInstantiateOperation that you can cancel with cancellationToken.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the position and rotation of the clones, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
| parameters | An InstantiateParameters struct that specifies options for the new object, such as its parent, the scene to add it to, and whether to use world space. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the position and rotation of the clones, applies the settings in parameters, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| positions | The read only span of positions for the new object or objects. The length of the span can be less than count, in which case Unity uses positions[i % positions.Length]. |
| rotations | The read only span of rotations for the new object or objects. The length of the span can be less than count, in which case Unity uses rotations[i % rotations.Length]. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the per-copy positions and rotations of the clones, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| positions | The read only span of positions for the new object or objects. The length of the span can be less than count, in which case Unity uses positions[i % positions.Length]. |
| rotations | The read only span of rotations for the new object or objects. The length of the span can be less than count, in which case Unity uses rotations[i % rotations.Length]. |
| parameters | An InstantiateParameters struct that specifies options for the new object, such as its parent, the scene to add it to, and whether to use world space. |
| cancellationToken | A token that you can use to cancel the asynchronous operation before it completes. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the per-copy positions and rotations of the clones, applies the settings in parameters, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| parent | The Transform to set as the parent of the new object. |
| position | The position for the new object or objects. |
| rotation | The rotation for the new object or objects. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the parent, position, and rotation of the clones, and returns an AsyncInstantiateOperation.
| Parameter | Description |
|---|---|
| original | An existing object that you want to make a copy of. |
| count | The number of new copies to create. |
| parent | The Transform to set as the parent of the new object. |
| positions | The read only span of positions for the new object or objects. The length of the span can be less than count, in which case Unity uses positions[i % positions.Length]. |
| rotations | The read only span of rotations for the new object or objects. The length of the span can be less than count, in which case Unity uses rotations[i % rotations.Length]. |
AsyncInstantiateOperation<T> An asynchronous operation that contains the resulting objects.
Clones the object of type T asynchronously, creates a specified number of copies, sets the parent and the per-copy positions and rotations of the clones, and returns an AsyncInstantiateOperation.