# RemoveState(AnimatorState)

> Utility function to remove a state from the state machine.

## Definition

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

```csharp
public void RemoveState(AnimatorState state)
```

### Parameters

**** (\[AnimatorState]\(/engine/6000.7/script-reference/unityeditor/animations/animatorstate)): The state to remove.

### Remarks

If the state is a sub asset of the state machine, it will be deleted. This function pushes an Undo operation.
