# ITransition

> Interface for a transition in a StateMachine.

## Definition

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

```csharp
public interface ITransition
```

## Remarks

A transition represents the connection from a source [IState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate.md) to a destination [IState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate.md), or a self transition anchored on a single state (in which case [ITransition.FromState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/fromstate.md) and [ITransition.ToState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/tostate.md) are the same state, and the transition is an [ISelfTransition](/engine/6000.7/script-reference/unity/graphtoolkit/editor/iselftransition.md)). A transition can carry several stacked rules; enumerate [ITransition.GetRules](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/getrules.md) to inspect each [ITransitionRule](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransitionrule.md) and the conditions under which the transition is taken. This interface is implemented by Unity and is not intended to be implemented by user code.

## Properties

| Property                                                                                                | Description                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [FillColor](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/fillcolor.md)         | The fill color of the transition's arrow.                                                                                                                                                      |
| [FromState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/fromstate.md)         | The state the transition originates from.                                                                                                                                                      |
| [Icon](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/icon.md)                   | The icon displayed for this transition in the transition inspector, or `null` if none is set.                                                                                                  |
| [ID](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/id.md)                       | The globally unique identifier for this transition.                                                                                                                                            |
| [IsDashed](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/isdashed.md)           | Whether the transition is drawn with a dashed pattern.                                                                                                                                         |
| [LineColor](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/linecolor.md)         | The color of the transition's wire and arrow border.                                                                                                                                           |
| [Opacity](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/opacity.md)             | The opacity multiplier applied to the transition.                                                                                                                                              |
| [RuleCount](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/rulecount.md)         | The number of rules stacked on this transition.                                                                                                                                                |
| [ToState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/tostate.md)             | The state the transition goes to. This is the same state as [ITransition.FromState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/fromstate.md) for a self transition. |
| [WidthOverride](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/widthoverride.md) | The line width override applied to the transition.                                                                                                                                             |

## Methods

| Method                                                                                            | Description                                                               |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [AddRule](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/addrule.md)       | Creates a new empty transition rule and appends it to this transition.    |
| [GetRule](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/getrule.md)       | Retrieves the rule at the specified index.                                |
| [GetRules](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/getrules.md)     | Retrieves the rules stacked on this transition, in the order they appear. |
| [RemoveRule](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition/removerule.md) | Removes a rule from this transition.                                      |
