# WarmUpProgressively(int, JobHandle)

> Prewarms the given number of shader variant state permutations using associated graphics states.

## Definition

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

```csharp
public JobHandle WarmUpProgressively(int count, JobHandle dependency = default)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The maximum number of variant permutations to warm up.**** (\[JobHandle]\(/engine/6000.3/script-reference/unity/jobs/jobhandle)): Job to wait for.

### Returns

| Type                                                                 | Description               |
| -------------------------------------------------------------------- | ------------------------- |
| [JobHandle](/engine/6000.3/script-reference/unity/jobs/jobhandle.md) | Handle to prewarming job. |

### Remarks

Full graphics state collection warmup is only supported when [SystemInfo.supportsParallelPSOCreation](/engine/6000.3/script-reference/unityengine/systeminfo/supportsparallelpsocreation.md) is true. Otherwise, behavior falls back to the legacy [ShaderVariantCollection.WarmUp](/engine/6000.3/script-reference/unityengine/shadervariantcollection/warmup.md) and `count` restricts the maximum number of shader variants instead of shader variant permutations.

```csharp
using UnityEngine;
using UnityEngine.Experimental.Rendering;
using Unity.Jobs;

public class GraphicsStateCollectionWarmup : MonoBehaviour
{
    public GraphicsStateCollection graphicsStateCollection;
    public int statesToWarmup;

    void Start()
    {
        JobHandle handle = graphicsStateCollection.WarmUpProgressively(statesToWarmup);
    }
}
```

Additional Resources: [GraphicsStateCollection.WarmUp](/engine/6000.3/script-reference/unityengine/experimental/rendering/graphicsstatecollection/warmup.md), [GraphicsStateCollection.isWarmedUp](/engine/6000.3/script-reference/unityengine/experimental/rendering/graphicsstatecollection/iswarmedup.md), [GraphicsStateCollection.completedWarmupCount](/engine/6000.3/script-reference/unityengine/experimental/rendering/graphicsstatecollection/completedwarmupcount.md), [ShaderVariantCollection.WarmUp](/engine/6000.3/script-reference/unityengine/shadervariantcollection/warmup.md).
