# Init

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

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## Init(Enum)

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

```csharp
public void Init(Enum defaultValue)
```

### Parameters

**** (\[Enum]\(https\://learn.microsoft.com/dotnet/api/system.enum)): The typed enum value.

## Init(Enum, bool)

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

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

### 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.
