# CreateAnimatorControllerAtPathWithClip(string, AnimationClip)

> Creates an AnimatorController at the given path, and automatically create an AnimatorLayer with an AnimatorStateMachine that will add a State with the AnimationClip in it.

## Definition

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

```csharp
public static AnimatorController CreateAnimatorControllerAtPathWithClip(string path, AnimationClip clip)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path where the AnimatorController will be created.**** (\[AnimationClip]\(/engine/6000.3/script-reference/unityengine/animationclip)): The default clip that will be played by the AnimatorController.

### Returns

| Type                                                                                               | Description |
| -------------------------------------------------------------------------------------------------- | ----------- |
| [AnimatorController](/engine/6000.3/script-reference/unityeditor/animations/animatorcontroller.md) |             |

### Remarks

This function pushes an Undo operation.
