# AddExitTransition

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

## Definition

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

## AddExitTransition()

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

```csharp
public AnimatorStateTransition AddExitTransition()
```

### Returns

| Type                                                                                                         | Description                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| [AnimatorStateTransition](/engine/6000.7/script-reference/unityeditor/animations/animatorstatetransition.md) | The [AnimatorStateTransition](/engine/6000.7/script-reference/unityeditor/animations/animatorstatetransition.md) that was added. |

### Remarks

The transition asset that is created is added as a sub asset of the state.

An example showing usage of this API can be found at the [AnimatorController](/engine/6000.7/script-reference/unityeditor/animations/animatorcontroller.md) page.

## AddExitTransition(bool)

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

```csharp
public AnimatorStateTransition AddExitTransition(bool defaultExitTime)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If true, the exit time will be the equivalent of 0.25 second.

### Returns

| Type                                                                                                         | Description                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| [AnimatorStateTransition](/engine/6000.7/script-reference/unityeditor/animations/animatorstatetransition.md) | The [AnimatorStateTransition](/engine/6000.7/script-reference/unityeditor/animations/animatorstatetransition.md) that was added. |

### Remarks

The transition asset that is created is added as a sub asset of the state.

An example showing usage of this API can be found at the [AnimatorController](/engine/6000.7/script-reference/unityeditor/animations/animatorcontroller.md) page.
