# RemoveGraphicsStatesForVariant

> Remove all associated graphics states from an input shader variant.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.7/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## RemoveGraphicsStatesForVariant(Shader, PassIdentifier, LocalKeyword\[])

Remove all associated graphics states from an input shader variant.

```csharp
public bool RemoveGraphicsStatesForVariant(Shader shader, PassIdentifier passId, LocalKeyword[] keywords)
```

### Parameters

**** (\[Shader]\(/engine/6000.7/script-reference/unityengine/shader)): Shader used in the variant.**** (\[PassIdentifier]\(/engine/6000.7/script-reference/unityengine/rendering/passidentifier)): PassIdentifier used in the variant.**** (\[LocalKeyword\[]]\(/engine/6000.7/script-reference/unityengine/rendering/localkeyword)): [LocalKeyword](/engine/6000.7/script-reference/unityengine/rendering/localkeyword.md) array of keywords used in the variant.

### Returns

| Type                                                          | Description                                    |
| ------------------------------------------------------------- | ---------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if successfully removed, false otherwise. |

### Remarks

Additional Resources: [GraphicsStateCollection.RemoveVariant](/engine/6000.7/script-reference/unityengine/rendering/graphicsstatecollection/removevariant.md), [GraphicsStateCollection.GetGraphicsStatesForVariant](/engine/6000.7/script-reference/unityengine/rendering/graphicsstatecollection/getgraphicsstatesforvariant.md).

## RemoveGraphicsStatesForVariant(ShaderVariant)

Remove all associated graphics states from an input shader variant.

```csharp
public bool RemoveGraphicsStatesForVariant(GraphicsStateCollection.ShaderVariant variant)
```

### Parameters

**** (\[ShaderVariant]\(/engine/6000.7/script-reference/unityengine/rendering/graphicsstatecollection/shadervariant)): The input shader variant.

### Returns

| Type                                                          | Description                                    |
| ------------------------------------------------------------- | ---------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if successfully removed, false otherwise. |

### Remarks

Additional Resources: [GraphicsStateCollection.RemoveVariant](/engine/6000.7/script-reference/unityengine/rendering/graphicsstatecollection/removevariant.md), [GraphicsStateCollection.GetGraphicsStatesForVariant](/engine/6000.7/script-reference/unityengine/rendering/graphicsstatecollection/getgraphicsstatesforvariant.md).
