---
title: MaterialUsageBasedVariants
product: Unity Editor
version: '6000.3'
latest_version: '7000.0'
status: This page documents version 6000.3. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.3/script-reference/unityeditor/shaders/shaderbuildsettings/shadervariantgenerationmode/materialusagebasedvariants
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/shaders/shaderbuildsettings/shadervariantgenerationmode/materialusagebasedvariants.md
last_updated: 2026-09-14
generated_at: 2026-11-11T18:54:26.750Z
locale: en-us
---

# MaterialUsageBasedVariants

> Generates variants only for the keyword combinations used by the materials in the build.

## Definition

* **Type:** Field
* **Namespace:** [UnityEditor.Shaders](/engine/6000.3/script-reference/unityeditor/shaders.md)
* **Assembly:** UnityEditor

```csharp
MaterialUsageBasedVariants = 1
```

### Remarks

This matches the behavior when you declare keywords as `shader_feature`.
