Description
The Gizmo.Object
property in the Sandbox.Gizmo
class is a static property that holds a reference to a generic object. This property is part of the Gizmo system, which is used for creating and manipulating visual aids in the Sandbox environment. The Object
property can be used to store any type of object that needs to be associated with a Gizmo, allowing for flexible and dynamic interactions within the scene.
Usage
To use the Gizmo.Object
property, you can directly assign or retrieve an object from it. This is useful when you need to associate a specific object with a Gizmo for further manipulation or interaction.
Example usage:
// Assign an object to the Gizmo.Object property
Gizmo.Object = myGameObject;
// Retrieve the object from the Gizmo.Object property
var associatedObject = Gizmo.Object;
Example
// Example of setting and getting the Gizmo.Object property
// Assume myGameObject is an instance of a GameObject or any other object
object myGameObject = new GameObject();
// Assign the object to the Gizmo.Object property
Gizmo.Object = myGameObject;
// Retrieve the object from the Gizmo.Object property
object associatedObject = Gizmo.Object;
// Check if the retrieved object is the same as the assigned one
if (associatedObject == myGameObject)
{
// Perform operations knowing the object is correctly associated
}