# Init(Enum, bool)

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

## Definition

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

```csharp
public void Init(Enum defaultValue, bool includeObsoleteValues = false)
```

### Parameters

**** (\[Enum]\(https\://learn.microsoft.com/dotnet/api/system.enum)): The typed enum value.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true to display obsolete values as choices.
