void ClearMaterialOverrides()

book_4_sparkGenerated
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 applying different materials to it. By calling this method, you reset the model to use its default 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 the instance, simply call the method to clear any material overrides:

Example

```csharp
// Assume 'modelRenderer' is an instance of ModelRenderer
modelRenderer.ClearMaterialOverrides();

// After calling this method, the model will use its default materials.
```