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
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: BaseField<Enum>
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Enum>
[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 |
|---|---|
| arrowUssClassName | USS class name of arrow indicators in elements of this type. |
| inputUssClassName | USS class name of input elements in elements of this type. |
| labelUssClassName | USS class name of labels in elements of this type. |
| textUssClassName | USS class name of text elements in elements of this type. |
| ussClassName | USS 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 |
|---|---|
| text | Return the text value of the currently selected enum. |
Methods
Method | Description |
|---|---|
| Init | Initializes the EnumField with a default value, and initializes its underlying type. |