# GetTransitions(IState, IState)

> Retrieves the transitions that connect one state to another.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
public IEnumerable<ITransition> GetTransitions(IState fromState, IState toState)
```

### Parameters

**** (\[IState]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate)): The state the transitions originate from.**** (\[IState]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate)): The state the transitions go to.

### Returns

| Type                                                                                                         | Description                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IEnumerable\<ITransition>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | An `IEnumerable` of the [ITransition](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition.md)s that go from `fromState` to `toState`, or an empty sequence if there is none. |

### Remarks

This is the state machine equivalent of retrieving the wire between two ports. Only transitions that leave `fromState` and enter `toState` are returned; the opposite direction is not included. To enumerate every transition on a single state, use [IState.GetIncomingTransitions()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/getincomingtransitions.md) and [IState.GetOutgoingTransitions()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/getoutgoingtransitions.md).
