Description
The MaterialGroup
property of the ModelRenderer
class specifies the material group to be used for rendering the model. This property is a string that identifies a specific group of materials within the model, allowing for customization of the model's appearance based on predefined material groups.
Usage
To use the MaterialGroup
property, simply assign a string value that corresponds to the desired material group within the model. This property is particularly useful when a model has multiple material groups and you want to switch between them dynamically.
Example
// Example of setting the MaterialGroup property
ModelRenderer modelRenderer = new ModelRenderer();
modelRenderer.MaterialGroup = "Group1"; // Set the material group to "Group1"