The Model
property of a SceneObject
specifies the 3D model that the scene object will render. This property is of type Sandbox.Model
, which represents the visual and geometric data of the model to be displayed in the scene.
The Model
property of a SceneObject
specifies the 3D model that the scene object will render. This property is of type Sandbox.Model
, which represents the visual and geometric data of the model to be displayed in the scene.
To use the Model
property, you can assign a Sandbox.Model
instance to it. This will determine what model the SceneObject
will render in the scene. You can also retrieve the current model assigned to the SceneObject
by accessing this property.
// Example of setting a model to a SceneObject SceneObject mySceneObject = new SceneObject(); mySceneObject.Model = Model.Load("models/my_model.vmdl"); // Example of getting the model from a SceneObject Model currentModel = mySceneObject.Model;