Version: 2020.1

ShaderUtil.RestoreAsyncCompilation

切换到手册
public static void RestoreAsyncCompilation (Rendering.CommandBuffer cmd);

参数

cmd 目标 CommandBuffer。

描述

在此 CommandBuffer 范围中恢复以前的着色器编译模式。

编辑器会按需编译着色器变体,首次渲染需要特定着色器变体。默认情况下,仅为源自 Game 视图或 Scene 视图的请求启用异步着色器编译。借助 SetAsyncCompilation,可以向 CommandBuffer 添加在缓冲区执行过程中控制着色器编译的命令。借助此方法 RestoreAsyncCompilation,可以恢复以前的编译模式。

另请参阅:SetAsyncCompilationallowAsyncCompilationanythingCompilingIsPassCompiledCompilePass

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961