# AddStateMachineExitTransition(AnimatorStateMachine)

> Utility function to add an outgoing transition from the source state machine to the exit of it's parent state machine.

## Definition

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

```csharp
public AnimatorTransition AddStateMachineExitTransition(AnimatorStateMachine sourceStateMachine)
```

### Parameters

**** (\[AnimatorStateMachine]\(/engine/6000.0/script-reference/unityeditor/animations/animatorstatemachine)): The source state machine.

### Returns

| Type                                                                                               | Description |
| -------------------------------------------------------------------------------------------------- | ----------- |
| [AnimatorTransition](/engine/6000.0/script-reference/unityeditor/animations/animatortransition.md) |             |

### Remarks

The transition asset that is created is added as a sub asset of the state. This function pushes an Undo operation.
