# IsPassCompiled(Material, int)

> Checks if the Shader variant for the given pass in the Material has already been compiled.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static bool IsPassCompiled(Material material, int pass)
```

### Parameters

**** (\[Material]\(/engine/6000.3/script-reference/unityengine/material)): The Material to check against.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the Shader pass to check.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

The Editor can compile Shaders asynchronously. You can use this method to check if the Editor has already compiled the particular Shader Variant needed for the specific pass of the Material.

Additional Resources: :ref::CompilePass, [ShaderUtil.allowAsyncCompilation](/engine/6000.3/script-reference/unityeditor/shaderutil/allowasynccompilation.md), [ShaderUtil.anythingCompiling](/engine/6000.3/script-reference/unityeditor/shaderutil/anythingcompiling.md), [ShaderUtil.SetAsyncCompilation](/engine/6000.3/script-reference/unityeditor/shaderutil/setasynccompilation.md), [ShaderUtil.RestoreAsyncCompilation](/engine/6000.3/script-reference/unityeditor/shaderutil/restoreasynccompilation.md).
