Version: 2019.2
ShaderLab: Fallback
ShaderLab: other commands

ShaderLab: CustomEditor

A CustomEditor can be defined for your shaderA small script that contains the mathematical calculations and algorithms for calculating the Color of each pixel rendered, based on the lighting input and the Material configuration. More info
See in Glossary
. 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.


    CustomEditor "name"

Use the ShaderGUI with a given name.


A CustomEditor statement effects all materials that use this Shader


Shader "example" {
    // properties and __subshaders__Each shader in Unity consists of a list of subshaders. When Unity has to display a mesh, it will find the shader to use, and pick the first subshader that runs on the user's graphics card. [More info](SL-SubShader.html)<span class="tooltipGlossaryLink">See in [Glossary](Glossary.html#subshader)</span> here...
    CustomEditor "MyCustomEditor"
ShaderLab: Fallback
ShaderLab: other commands
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。