# RestoreAsyncCompilation(CommandBuffer)

> Restores the previous Shader compilation mode in this CommandBuffer scope.

## Definition

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

```csharp
public static void RestoreAsyncCompilation(CommandBuffer cmd)
```

### Parameters

**** (\[CommandBuffer]\(/engine/6000.7/script-reference/unityengine/rendering/commandbuffer)): Target CommandBuffer.

### Remarks

The Editor compiles Shader Variants on-demand, the first time rendering requires a particular Shader Variant. By default, asynchronous Shader compilation is only enabled for requests that originate from the Game View or Scene View. With [ShaderUtil.SetAsyncCompilation](/engine/6000.7/script-reference/unityeditor/shaderutil/setasynccompilation.md), you can add commands to the [CommandBuffer](/engine/6000.7/script-reference/unityengine/rendering/commandbuffer.md) that control the Shader compilation during the execution of the buffer. With this method, *RestoreAsyncCompilation*, you can restore the previous compilation mode.

Additional Resources: [ShaderUtil.SetAsyncCompilation](/engine/6000.7/script-reference/unityeditor/shaderutil/setasynccompilation.md), [ShaderUtil.allowAsyncCompilation](/engine/6000.7/script-reference/unityeditor/shaderutil/allowasynccompilation.md), [ShaderUtil.anythingCompiling](/engine/6000.7/script-reference/unityeditor/shaderutil/anythingcompiling.md), [ShaderUtil.IsPassCompiled](/engine/6000.7/script-reference/unityeditor/shaderutil/ispasscompiled.md), [ShaderUtil.CompilePass](/engine/6000.7/script-reference/unityeditor/shaderutil/compilepass.md).
