docs.unity3d.com
    Show / Hide Table of Contents

    Class TMP_BaseShaderGUI

    Base class for TextMesh Pro shader GUIs.

    Inheritance
    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.FindProperty(String, MaterialProperty[])
    ShaderGUI.FindProperty(String, MaterialProperty[], Boolean)
    Namespace: TMPro.EditorUtilities
    Syntax
    public abstract class TMP_BaseShaderGUI : ShaderGUI

    Fields

    m_Editor

    Declaration
    protected MaterialEditor m_Editor
    Field Value
    Type Description
    MaterialEditor

    m_Material

    Declaration
    protected Material m_Material
    Field Value
    Type Description
    Material

    m_Properties

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

    s_DebugExtended

    Declaration
    protected static bool s_DebugExtended
    Field Value
    Type Description
    Boolean

    s_LbrtVectorLabels

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

    s_XywhVectorLabels

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

    Methods

    BeginPanel(String, Boolean)

    Declaration
    protected bool BeginPanel(string panel, bool expanded)
    Parameters
    Type Name Description
    String panel
    Boolean expanded
    Returns
    Type Description
    Boolean

    BeginPanel(String, TMP_BaseShaderGUI.ShaderFeature, Boolean, Boolean)

    Declaration
    protected bool BeginPanel(string panel, TMP_BaseShaderGUI.ShaderFeature feature, bool expanded, bool readState = true)
    Parameters
    Type Name Description
    String panel
    TMP_BaseShaderGUI.ShaderFeature feature
    Boolean expanded
    Boolean readState
    Returns
    Type Description
    Boolean

    DoColor(String, String)

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

    DoCubeMap(String, String)

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

    DoFloat(String, String)

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

    DoGUI()

    Override this method to create the specific shader GUI.

    Declaration
    protected abstract void DoGUI()

    DoPopup(String, String, GUIContent[])

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

    DoSlider(String, String)

    Declaration
    protected void DoSlider(string name, string label)
    Parameters
    Type Name Description
    String name
    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
    String name
    String label
    Boolean withTilingOffset
    String[] speedNames

    DoToggle(String, String)

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

    DoUVSpeed(Rect, String[])

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

    DoVector(String, String, GUIContent[])

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

    DoVector3(String, String)

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

    EndPanel()

    Declaration
    public void EndPanel()

    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[])
    In This Article
    • Fields
      • m_Editor
      • m_Material
      • m_Properties
      • s_DebugExtended
      • s_LbrtVectorLabels
      • s_XywhVectorLabels
    • Methods
      • BeginPanel(String, Boolean)
      • BeginPanel(String, TMP_BaseShaderGUI.ShaderFeature, Boolean, Boolean)
      • DoColor(String, String)
      • DoCubeMap(String, String)
      • DoFloat(String, String)
      • DoGUI()
      • DoPopup(String, String, GUIContent[])
      • DoSlider(String, String)
      • DoTexture2D(String, String, Boolean, String[])
      • DoToggle(String, String)
      • DoUVSpeed(Rect, String[])
      • DoVector(String, String, GUIContent[])
      • DoVector3(String, String)
      • EndPanel()
      • OnGUI(MaterialEditor, MaterialProperty[])
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • 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 18 October 2023