docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BaseShaderGUI

    The base class for shader GUI in URP.

    Inheritance
    object
    ShaderGUI
    BaseShaderGUI
    Inherited Members
    ShaderGUI.OnMaterialPreviewGUI(MaterialEditor, Rect, GUIStyle)
    ShaderGUI.OnMaterialInteractivePreviewGUI(MaterialEditor, Rect, GUIStyle)
    ShaderGUI.OnMaterialPreviewSettingsGUI(MaterialEditor)
    ShaderGUI.OnClosed(Material)
    ShaderGUI.ValidateMaterial(Material)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor
    Assembly: Unity.RenderPipelines.Universal.Editor.dll
    Syntax
    public abstract class BaseShaderGUI : ShaderGUI

    Fields

    Name Description
    m_FirstTimeApply

    Used to sure that needed setup (ie keywords/render queue) are set up when switching some existing material to a universal shader.

    Properties

    Name Description
    alphaClipProp

    The MaterialProperty for alpha clip.

    alphaCutoffProp

    The MaterialProperty for alpha cutoff.

    baseColorProp

    The MaterialProperty for base color.

    baseMapProp

    The MaterialProperty for base map.

    blendModeProp

    The MaterialProperty for the blend mode.

    castShadowsProp

    The MaterialProperty for cast shadows.

    cullingProp

    The MaterialProperty for cull mode.

    emissionColorProp

    The MaterialProperty for emission color.

    emissionMapProp

    The MaterialProperty for emission map.

    materialEditor

    The editor for the material.

    materialFilter

    Filter for the surface options, surface inputs, details and advanced foldouts.

    preserveSpecProp

    The MaterialProperty for preserve specular.

    queueControlProp

    The MaterialProperty for queue control.

    queueOffsetProp

    The MaterialProperty for queue offset.

    receiveShadowsProp

    The MaterialProperty for receive shadows.

    surfaceTypeProp

    The MaterialProperty for surface type.

    ztestProp

    The MaterialProperty for zTest.

    zwriteProp

    The MaterialProperty for zWrite.

    Methods

    Name Description
    AssignNewShaderToMaterial(Material, Shader, Shader)

    Assigns a new shader to the material.

    DoPopup(GUIContent, MaterialProperty, string[])

    Helper function to draw a popup.

    DrawAdvancedOptions(Material)

    Draws the advanced options GUI.

    DrawBaseProperties(Material)

    Draws the base properties GUI.

    DrawEmissionProperties(Material, bool)

    Draws the emission properties.

    DrawNormalArea(MaterialEditor, MaterialProperty, MaterialProperty)

    Draws the GUI for the normal area.

    DrawQueueOffsetField()

    Draws the queue offset field.

    DrawSurfaceInputs(Material)

    Draws the surface inputs GUI.

    DrawSurfaceOptions(Material)

    Draws the surface options GUI.

    DrawTileOffset(MaterialEditor, MaterialProperty)

    Draws the tile offset GUI.

    FillAdditionalFoldouts(MaterialHeaderScopeList)

    Draws additional foldouts.

    FindProperties(MaterialProperty[])

    Finds all the properties used in the Base Shader GUI.

    FindProperty(string, MaterialProperty[])

    Searches and tries to find a property in an array of properties.

    FindProperty(string, MaterialProperty[], bool)

    Searches and tries to find a property in an array of properties.

    OnGUI(MaterialEditor, MaterialProperty[])
    OnOpenGUI(Material, MaterialEditor)

    Draws the GUI for the material.

    SetMaterialKeywords(Material, Action<Material>, Action<Material>)

    Sets up the keywords for the material and shader.

    SetupMaterialBlendMode(Material)

    Sets up the blend mode.

    ShaderPropertiesGUI(Material)

    Draws the shader properties GUI.

    TextureColorProps(MaterialEditor, GUIContent, MaterialProperty, MaterialProperty, bool)

    Helper function to show texture and color properties.

    TwoFloatSingleLine(GUIContent, MaterialProperty, GUIContent, MaterialProperty, GUIContent, MaterialEditor, float)

    Helper function to draw two float variables in one lines.

    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)