# EnumFlagsField

> Constructs an EnumFlagsField with a default value, and initializes its underlying type.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor.UIElements](/engine/6000.3/script-reference/unityeditor/uielements.md)
* **Assembly:** UnityEditor

## EnumFlagsField(Enum)

Constructs an EnumFlagsField with a default value, and initializes its underlying type.

```csharp
public EnumFlagsField(Enum defaultValue)
```

### Parameters

**** (\[Enum]\(https\://learn.microsoft.com/dotnet/api/system.enum)): Initial value. This also detects the Enum type.

## EnumFlagsField(Enum, bool)

Constructs an EnumFlagsField with a default value, and initializes its underlying type.

```csharp
public EnumFlagsField(Enum defaultValue, bool includeObsoleteValues)
```

### Parameters

**** (\[Enum]\(https\://learn.microsoft.com/dotnet/api/system.enum)): Initial value. This also detects the Enum type.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

## EnumFlagsField(string, Enum)

Constructs an EnumFlagsField with a default value, and initializes its underlying type.

```csharp
public EnumFlagsField(string label, Enum defaultValue)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[Enum]\(https\://learn.microsoft.com/dotnet/api/system.enum)): Initial value. This also detects the Enum type.

## EnumFlagsField()

Constructs an EnumFlagsField with a default value, and initializes its underlying type.

```csharp
public EnumFlagsField()
```

## EnumFlagsField(string, Enum, bool)

Constructs an EnumFlagsField with a default value, and initializes its underlying type.

```csharp
public EnumFlagsField(string label, Enum defaultValue, bool includeObsoleteValues)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[Enum]\(https\://learn.microsoft.com/dotnet/api/system.enum)): Initial value. This also detects the Enum type.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

## EnumFlagsField(string)

Constructs an EnumFlagsField with a default value, and initializes its underlying type.

```csharp
public EnumFlagsField(string label)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;
