# ShaderVariant(Shader, PassType, params string[])

> Creates a ShaderVariant structure.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine](/engine/6000.3/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## ShaderVariant(Shader, PassType, string\[])

```csharp
public ShaderVariant(Shader shader, PassType passType, params string[] keywords)
```

### Parameters

**** (\[Shader]\(/engine/6000.3/script-reference/unityengine/shader)): **** (\[PassType]\(/engine/6000.3/script-reference/unityengine/rendering/passtype)): **** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Remarks

Note that this will throw an ArgumentException if shader is null, pass type does not exist or variant with the passed keywords is not found.

Additional Resources: [ShaderVariantCollection.Add](/engine/6000.3/script-reference/unityengine/shadervariantcollection/add.md).
