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.

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"
}
对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答