# ContainsVariant(Shader, PassIdentifier, LocalKeyword[])

> Check if variant exists in collection.

## Definition

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

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

### Parameters

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

### Returns

| Type                                                          | Description                                                    |
| ------------------------------------------------------------- | -------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if variant exists in collection, false otherwise. |
