Version: 2022.3
言語: 日本語
public void SetErrorMaterial (Material material);

パラメーター

material The material to display when there is a problem with a shader or material. If this value is null, Unity does not display anything.

説明

Set the error material for the BatchRendererGroup. This material will be used internally by Unity to render the draw commands referring to erroneous shaders. You can also pass 'null' to this method to unset the material.

When you render with a BatchRendererGroup and there is a problem with the shader or material, Unity doesn't display the default error shader. Use this function to display a given material instead. **Note:** For performance reasons, Unity only displays this material in the Editor and in development builds. Unity does not display this material in release builds.

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