EnumFlagsField
Makes a dropdown for switching between enum flag values that are marked with the Flags attribute.
Read time 10 minutesLast updated 4 days ago
Definition
- Type: Class
- Namespace: UnityEditor.UIElements
- Assembly: UnityEditor.CoreModule
- Inherits from: BaseMaskField<Enum>
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Enum>
[Icon("UIToolkit/Icons/EnumFlagsField.png")][UxmlElement]public class EnumFlagsField : BaseMaskField<Enum>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<Enum>
Remarks
An option for the value 0 with name "Nothing" and an option for the value ~0 (that is, all bits set) with the name "Everything" are always displayed at the top of the menu. The names for the values 0 and ~0 can be overriden by defining these values in the enum type.
For more information, refer to UXML element EnumFlagsField.
Static Fields
Value | Description |
|---|---|
| inputUssClassName | USS class name for input elements of this type. |
| labelUssClassName | USS class name for labels of this type. |
| ussClassName | USS class name for elements of this type. |
Constructors
Constructor | Description |
|---|---|
| EnumFlagsField() | Constructs an EnumFlagsField with a default value, and initializes its underlying type. |
| EnumFlagsField(System.Enum) | Constructs an EnumFlagsField with a default value, and initializes its underlying type. |
| EnumFlagsField(System.Enum,System.Boolean) | Constructs an EnumFlagsField with a default value, and initializes its underlying type. |
| EnumFlagsField(System.String) | Constructs an EnumFlagsField with a default value, and initializes its underlying type. |
| EnumFlagsField(System.String,System.Enum) | Constructs an EnumFlagsField with a default value, and initializes its underlying type. |
| EnumFlagsField(System.String,System.Enum,System.Boolean) | Constructs an EnumFlagsField with a default value, and initializes its underlying type. |
Methods
Method | Description |
|---|---|
| Init | Initializes the EnumFlagsField with a default value, and initializes its underlying type. |