Transform Transform

robot_2Generated
code_blocksInput

Description

The Transform field in the CloneConfig struct represents the transformation data for a cloned GameObject. This includes position, rotation, and scale information that will be applied to the cloned object within the scene.

Usage

To use the Transform field, you need to create an instance of the CloneConfig struct and set the Transform field to the desired transformation values. This will determine how the cloned GameObject is positioned and oriented in the scene.

Example

// Example of using the Transform field in CloneConfig

// Create a new CloneConfig instance
CloneConfig cloneConfig = new CloneConfig();

// Set the Transform field with desired transformation data
cloneConfig.Transform = new Transform
{
    Position = new Vector3(0, 0, 0),
    Rotation = new Rotation(0, 0, 0),
    Scale = new Vector3(1, 1, 1)
};

// Use cloneConfig to clone a GameObject
GameObject clonedObject = originalObject.Clone(cloneConfig);