# variantCount

> The number of shader variants contained in this collection.

## Definition

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

```csharp
public int variantCount { get; }
```

### Remarks

Each shader variant may have multiple associated graphics states that are used when prewarming to create accurate GPU representations.

Additional Resources: [GraphicsStateCollection.GetVariants](/engine/6000.6/script-reference/unityengine/rendering/graphicsstatecollection/getvariants.md).
