Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


EnumFlagsField

Makes a dropdown for switching between enum flag values that are marked with the Flags attribute.
Read time 10 minutesLast updated 5 days ago

Definition

[UxmlElement(visibility = LibraryVisibility.Visible)][Icon("UIToolkit/Icons/EnumFlagsField.png")]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

inputUssClassNameUSS class name for input elements of this type.
labelUssClassNameUSS class name for labels of this type.
ussClassNameUSS 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

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

Inheritance

Inherited Members