# SetOverrideMotion(AnimatorState, Motion)

> Sets the override motion for the state on the given layer.

## Definition

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

```csharp
public void SetOverrideMotion(AnimatorState state, Motion motion)
```

### Parameters

**** (\[AnimatorState]\(/engine/6000.0/script-reference/unityeditor/animations/animatorstate)): The state which we want to set the motion.**** (\[Motion]\(/engine/6000.0/script-reference/unityengine/motion)): The motion that will be set.
