RuntimeAnimatorController.Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent)
Clones the object original and returns the clone.
Parameters:
Name | Type | Description |
---|---|---|
original | Object | An existing object that you want to make a copy of. |
position | Vector3 | Position for the new object. |
rotation | Quaternion | Orientation of the new object. |
parent | Transform | Parent that will be assigned to the new object. |
Returns:
type | Description |
---|---|
Object | The instantiated clone. |
Usage
---@type Object
local original;
---@type Vector3
local position;
---@type Quaternion
local rotation;
---@type Transform
local parent;
local val0 = RuntimeAnimatorController:Instantiate(original, position, rotation, parent)