docs.unity3d.com
    Show / Hide Table of Contents

    Class TMP_BaseShaderGUI

    Base class for TextMesh Pro shader GUIs.

    Inheritance
    System.Object
    ShaderGUI
    TMP_BaseShaderGUI
    TMP_BitmapShaderGUI
    TMP_SDFShaderGUI
    Inherited Members
    ShaderGUI.OnMaterialPreviewGUI(MaterialEditor, Rect, GUIStyle)
    UnityEditor.ShaderGUI.OnMaterialInteractivePreviewGUI(UnityEditor.MaterialEditor, UnityEngine.Rect, UnityEngine.GUIStyle)
    ShaderGUI.OnMaterialPreviewSettingsGUI(MaterialEditor)
    ShaderGUI.OnClosed(Material)
    ShaderGUI.AssignNewShaderToMaterial(Material, Shader, Shader)
    ShaderGUI.ValidateMaterial(Material)
    ShaderGUI.FindProperty(String, MaterialProperty[])
    ShaderGUI.FindProperty(String, MaterialProperty[], Boolean)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: TMPro.EditorUtilities
    Syntax
    public abstract class TMP_BaseShaderGUI : ShaderGUI

    Fields

    editor

    Declaration
    protected MaterialEditor editor
    Field Value
    Type Description
    MaterialEditor

    lbrtVectorLabels

    Declaration
    protected static GUIContent[] lbrtVectorLabels
    Field Value
    Type Description
    GUIContent[]

    material

    Declaration
    protected Material material
    Field Value
    Type Description
    Material

    properties

    Declaration
    protected MaterialProperty[] properties
    Field Value
    Type Description
    MaterialProperty[]

    xywhVectorLabels

    Declaration
    protected static GUIContent[] xywhVectorLabels
    Field Value
    Type Description
    GUIContent[]

    Methods

    DoColor(String, String)

    Declaration
    protected void DoColor(string name, string label)
    Parameters
    Type Name Description
    System.String name
    System.String label

    DoCubeMap(String, String)

    Declaration
    protected void DoCubeMap(string name, string label)
    Parameters
    Type Name Description
    System.String name
    System.String label

    DoEmptyLine()

    Declaration
    protected void DoEmptyLine()

    DoFloat(String, String)

    Declaration
    protected void DoFloat(string name, string label)
    Parameters
    Type Name Description
    System.String name
    System.String label

    DoGUI()

    Override this method to create the specific shader GUI.

    Declaration
    protected abstract void DoGUI()

    DoPanelHeader(TMP_BaseShaderGUI.MaterialPanel)

    Declaration
    protected bool DoPanelHeader(TMP_BaseShaderGUI.MaterialPanel panel)
    Parameters
    Type Name Description
    TMP_BaseShaderGUI.MaterialPanel panel
    Returns
    Type Description
    System.Boolean

    DoPanelHeader(TMP_BaseShaderGUI.MaterialPanel, TMP_BaseShaderGUI.ShaderFeature, Boolean)

    Declaration
    protected bool DoPanelHeader(TMP_BaseShaderGUI.MaterialPanel panel, TMP_BaseShaderGUI.ShaderFeature feature, bool readState = true)
    Parameters
    Type Name Description
    TMP_BaseShaderGUI.MaterialPanel panel
    TMP_BaseShaderGUI.ShaderFeature feature
    System.Boolean readState
    Returns
    Type Description
    System.Boolean

    DoPopup(String, String, GUIContent[])

    Declaration
    protected void DoPopup(string name, string label, GUIContent[] options)
    Parameters
    Type Name Description
    System.String name
    System.String label
    GUIContent[] options

    DoSlider(String, String)

    Declaration
    protected void DoSlider(string name, string label)
    Parameters
    Type Name Description
    System.String name
    System.String label

    DoTexture2D(String, String, Boolean, String[])

    Declaration
    protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null)
    Parameters
    Type Name Description
    System.String name
    System.String label
    System.Boolean withTilingOffset
    System.String[] speedNames

    DoToggle(String, String)

    Declaration
    protected void DoToggle(string name, string label)
    Parameters
    Type Name Description
    System.String name
    System.String label

    DoUVSpeed(Rect, String[])

    Declaration
    protected void DoUVSpeed(Rect rect, string[] names)
    Parameters
    Type Name Description
    Rect rect
    System.String[] names

    DoVector(String, String, GUIContent[])

    Declaration
    protected void DoVector(string name, string label, GUIContent[] subLabels)
    Parameters
    Type Name Description
    System.String name
    System.String label
    GUIContent[] subLabels

    DoVector3(String, String)

    Declaration
    protected void DoVector3(string name, string label)
    Parameters
    Type Name Description
    System.String name
    System.String label

    OnGUI(MaterialEditor, MaterialProperty[])

    Declaration
    public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties)
    Parameters
    Type Name Description
    MaterialEditor materialEditor
    MaterialProperty[] properties
    Overrides
    ShaderGUI.OnGUI(MaterialEditor, MaterialProperty[])
    Back to top
    Copyright © 2025 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 02 April 2025