Description
The AddMesh
method is a member of the ModelBuilder
class in the Sandbox API. This method allows you to add a Mesh
to the model being constructed. It is a non-static, public method that returns the ModelBuilder
instance, enabling method chaining.
Usage
To use the AddMesh
method, you need to have an instance of ModelBuilder
. You can then call AddMesh
on this instance, passing a Mesh
object as a parameter. This method is useful when you want to build a model by adding various mesh components to it.
Example
// Create a new ModelBuilder instance
ModelBuilder builder = new ModelBuilder();
// Create a mesh instance
Mesh myMesh = new Mesh();
// Add the mesh to the model builder
builder.AddMesh(myMesh);
// Continue building the model or finalize it
Model model = builder.Create();