void ClearMaterialOverrides()

robot_2Generated
code_blocksInput

Description

The ClearMaterialOverrides method is a member of the ModelRenderer class in the Sandbox API. This method is used to remove all material overrides that have been applied to a model. Material overrides allow you to change the appearance of a model by replacing its materials with different ones. By calling this method, you reset the model to use its original materials as defined in the model asset.

Usage

To use the ClearMaterialOverrides method, you need to have an instance of the ModelRenderer class. Once you have this instance, you can call the method directly to clear any material overrides that have been set on the model.

Example

// Assuming 'modelRenderer' is an instance of ModelRenderer
modelRenderer.ClearMaterialOverrides();

// This will reset the model to use its original materials.