# AddEntryTransition

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

## Definition

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

## AddEntryTransition(AnimatorState)

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

```csharp
public AnimatorTransition AddEntryTransition(AnimatorState destinationState)
```

### Parameters

**** (\[AnimatorState]\(/engine/6000.3/script-reference/unityeditor/animations/animatorstate)): The destination [AnimatorState](/engine/6000.3/script-reference/unityeditor/animations/animatorstate.md) state.

### Returns

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

### 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.3/script-reference/unityeditor/animations/animatorcontroller.md) page.

## AddEntryTransition(AnimatorStateMachine)

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

```csharp
public AnimatorTransition AddEntryTransition(AnimatorStateMachine destinationStateMachine)
```

### Parameters

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

### Returns

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

### 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.3/script-reference/unityeditor/animations/animatorcontroller.md) page.
