docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OptionalEnumPropertyDrawer<T>

    Draws the Inspector GUI for an optional enum property

    Inheritance
    object
    GUIDrawer
    PropertyDrawer
    OptionalEnumPropertyDrawer<T>
    OptionalDirDrawer
    OptionalPreferredTooltipPlacementDrawer
    Inherited Members
    PropertyDrawer.OnGUI(Rect, SerializedProperty, GUIContent)
    PropertyDrawer.GetPropertyHeight(SerializedProperty, GUIContent)
    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: Unity.AppUI.Editor
    Assembly: Unity.AppUI.Editor.dll
    Syntax
    public class OptionalEnumPropertyDrawer<T> : PropertyDrawer where T : struct, Enum
    Type Parameters
    Name Description
    T

    The type of the optional property

    Methods

    CreatePropertyGUI(SerializedProperty)

    Creates custom GUI with UI Toolkit for the property.

    Declaration
    public override VisualElement CreatePropertyGUI(SerializedProperty property)
    Parameters
    Type Name Description
    SerializedProperty property

    The SerializedProperty to make the custom GUI for.

    Returns
    Type Description
    VisualElement

    The element containing the custom GUI.

    Overrides
    PropertyDrawer.CreatePropertyGUI(SerializedProperty)
    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)