The Name
field in the CloneConfig
struct represents the name of the cloned GameObject
. This field is used to specify or retrieve the name assigned to a cloned instance of a GameObject
within the scene.
The Name
field in the CloneConfig
struct represents the name of the cloned GameObject
. This field is used to specify or retrieve the name assigned to a cloned instance of a GameObject
within the scene.
To use the Name
field, you can directly access it from an instance of CloneConfig
. This field is public and non-static, meaning it is specific to each instance of CloneConfig
. You can set or get the name of the GameObject
clone as needed.
// Example of using the Name field in CloneConfig // Create a new instance of CloneConfig CloneConfig cloneConfig = new CloneConfig(); // Set the name of the GameObject clone cloneConfig.Name = "MyClonedObject"; // Retrieve the name of the GameObject clone string cloneName = cloneConfig.Name; // Output the name // Note: Avoid using Console.WriteLine in Sandbox // Use appropriate logging or UI display methods instead // Log.Info(cloneName);