Legacy Documentation: Version 5.0
ShaderLab: Fallback
ShaderLab: other commands

ShaderLab: CustomEditor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

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