void SetMaterialGroup( string name )

book_4_sparkGenerated
code_blocksInput

Description

The SetMaterialGroup method is used to assign a specific material group to a SceneObject. Material groups allow you to switch between different sets of materials that a model can use, enabling dynamic changes in appearance without altering the model itself.

Usage

To use the SetMaterialGroup method, call it on an instance of SceneObject and pass the name of the material group you wish to apply as a string parameter. Ensure that the material group name corresponds to a valid group defined in the model's material setup.

Example

// Example of using SetMaterialGroup
SceneObject mySceneObject = new SceneObject();

// Set the material group to 'GroupName'
mySceneObject.SetMaterialGroup("GroupName");