---
title: computeVariantCount
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/computevariantcount
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/computevariantcount.md
last_updated: 2026-11-13
generated_at: 2026-11-18T09:02:36.505Z
locale: en-us
---

# computeVariantCount

> The number of compute shader variants contained in this collection.

## Definition

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

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

### Remarks

Additional Resources: [GraphicsStateCollection.GetComputeVariants](/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/getcomputevariants.md), [GraphicsStateCollection.AddComputeVariant](/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/addcomputevariant.md), [GraphicsStateCollection.ContainsComputeVariant](/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/containscomputevariant.md), [GraphicsStateCollection.RemoveComputeVariant](/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/removecomputevariant.md), [GraphicsStateCollection.completedWarmupCount](/engine/7000.0/script-reference/unityengine/rendering/graphicsstatecollection/completedwarmupcount.md).
