Legacy Documentation: Version 5.6 (Go to current version)
ShaderLab: Fallback
ShaderLab: other commands
Other Versions

ShaderLab: CustomEditor

A CustomEditor can be defined for your shader. When you do this Unity will look for a class that extends ShaderGUI with this name. If one is found any material that uses this shader will use this ShaderGUI. See Custom Shader GUI for examples.

Syntax

    CustomEditor "name"

Use the ShaderGUI with a given name.

Details

A CustomEditor statement effects all materials that use this Shader

Example

Shader "example" {
    // properties and subshaders here...
    CustomEditor "MyCustomEditor"
}
ShaderLab: Fallback
ShaderLab: other commands
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961