docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class StyleDrawer

    Inheritance
    object
    GUIDrawer
    PropertyDrawer
    StyleDrawer
    Inherited Members
    PropertyDrawer.CreatePropertyGUI(SerializedProperty)
    PropertyDrawer.CanCacheInspectorGUI(SerializedProperty)
    PropertyDrawer.attribute
    PropertyDrawer.fieldInfo
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TMPro.EditorUtilities
    Assembly: Unity.TextMeshPro.Editor.dll
    Syntax
    [CustomPropertyDrawer(typeof(TMP_Style))]
    public class StyleDrawer : PropertyDrawer

    Fields

    height

    Declaration
    public static readonly float height
    Field Value
    Type Description
    float

    Methods

    GetPropertyHeight(SerializedProperty, GUIContent)

    Override this method to specify how tall the GUI for this field is in pixels.

    Declaration
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
    Parameters
    Type Name Description
    SerializedProperty property

    The SerializedProperty to make the custom GUI for.

    GUIContent label

    The label of this property.

    Returns
    Type Description
    float

    The height in pixels.

    Overrides
    PropertyDrawer.GetPropertyHeight(SerializedProperty, GUIContent)

    OnGUI(Rect, SerializedProperty, GUIContent)

    Override this method to make your own IMGUI based GUI for the property.

    Declaration
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    Parameters
    Type Name Description
    Rect position

    Rectangle on the screen to use for the property GUI.

    SerializedProperty property

    The SerializedProperty to make the custom GUI for.

    GUIContent label

    The label of this property.

    Overrides
    PropertyDrawer.OnGUI(Rect, SerializedProperty, GUIContent)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)