# AddLayer

> Utility function to add a layer to the controller.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Animations](/engine/6000.7/script-reference/unityeditor/animations.md)
* **Assembly:** UnityEditor.CoreModule

## AddLayer(string)

Utility function to add a layer to the controller.

```csharp
public void AddLayer(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the Layer.

### Remarks

This function pushes an Undo operation.

## AddLayer(AnimatorControllerLayer)

Utility function to add a layer to the controller.

```csharp
public void AddLayer(AnimatorControllerLayer layer)
```

### Parameters

**** (\[AnimatorControllerLayer]\(/engine/6000.7/script-reference/unityeditor/animations/animatorcontrollerlayer)): The layer to add.

### Remarks

This function pushes an Undo operation.
