Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EnumField

Makes a dropdown for switching between enum values. For more information, refer to UXML element EnumField.
Read time 9 minutesLast updated 2 days ago

Definition

[Icon("UIToolkit/Icons/EnumField.png")][UxmlElement(libraryPath = "Controls")]public class EnumField : BaseField<Enum>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Enum>

Static Fields

Value

Description

arrowUssClassNameUSS class name of arrow indicators in elements of this type.
inputUssClassNameUSS class name of input elements in elements of this type.
labelUssClassNameUSS class name of labels in elements of this type.
textUssClassNameUSS class name of text elements in elements of this type.
ussClassNameUSS class name of elements of this type.

Constructors

Constructor

Description

EnumField()Construct an EnumField.
EnumField(System.Enum)Construct an EnumField.
EnumField(System.String,System.Enum)Construct an EnumField.

Properties

Property

Description

textReturn the text value of the currently selected enum.

Methods

Method

Description

InitInitializes the EnumField with a default value, and initializes its underlying type.

Inheritance

Inherited Members