# LayerField

> Initializes and returns an instance of LayerField.

## Definition

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

## LayerField(string)

Initializes and returns an instance of LayerField.

```csharp
public LayerField(string label)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text to use as a label for the field.

## LayerField()

Initializes and returns an instance of LayerField.

```csharp
public LayerField()
```

## LayerField(int)

Initializes and returns an instance of LayerField.

```csharp
public LayerField(int defaultValue)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The initial layer value this field should use.

## LayerField(string, int)

Initializes and returns an instance of LayerField.

```csharp
public LayerField(string label, int defaultValue)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text to use as a label for the field.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The initial layer value this field should use.
