Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RestoreAsyncCompilation(CommandBuffer)

Restores the previous Shader compilation mode in this CommandBuffer scope.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static void RestoreAsyncCompilation(CommandBuffer cmd)

Parameters

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, you can add commands to the CommandBuffer that control the Shader compilation during the execution of the buffer. With this method, RestoreAsyncCompilation, you can restore the previous compilation mode.