docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HDShaderGUI

    Use this class to build your custom Shader GUI for HDRP. You can use a class that inherits from HDShaderGUI in the Shader Graph Custom EditorGUI field.

    Inheritance
    object
    ShaderGUI
    HDShaderGUI
    DecalShaderGraphGUI
    LightingShaderGraphGUI
    UnlitShaderGraphGUI
    Inherited Members
    ShaderGUI.OnMaterialPreviewSettingsGUI(MaterialEditor)
    ShaderGUI.OnClosed(Material)
    ShaderGUI.AssignNewShaderToMaterial(Material, Shader, Shader)
    ShaderGUI.ValidateMaterial(Material)
    ShaderGUI.FindProperty(string, MaterialProperty[])
    ShaderGUI.FindProperty(string, MaterialProperty[], bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Editor.dll
    Syntax
    public abstract class HDShaderGUI : ShaderGUI

    Methods

    Name Description
    OnGUI(MaterialEditor, MaterialProperty[])

    Unity calls this function when it displays the GUI. This method is sealed so you cannot override it. To implement your custom GUI, use OnMaterialGUI instead.

    OnMaterialGUI(MaterialEditor, MaterialProperty[])

    Implement your custom GUI in this function. To display a UI similar to HDRP shaders, use a MaterialUIBlockList.

    OnMaterialInteractivePreviewGUI(MaterialEditor, Rect, GUIStyle)

    Override the material interactive preview GUI.

    OnMaterialPreviewGUI(MaterialEditor, Rect, GUIStyle)

    Override the material preview GUI.

    SetupMaterialKeywordsAndPass(Material)

    Sets up the keywords and passes for the material you pass in as a parameter.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)