Interface for a transition in a StateMachine.
A transition represents the connection from a source IState to a destination IState, or a self transition anchored on a single state (in which case ITransition.FromState and ITransition.ToState are the same state, and the transition is an ISelfTransition). A transition can carry several stacked rules; enumerate ITransition.GetRules to inspect each ITransitionRule 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.
| Property | Description |
|---|---|
| FillColor | The fill color of the transition's arrow. |
| FromState | The state the transition originates from. |
| Icon | The icon displayed for this transition in the transition inspector, or null if none is set. |
| ID | The globally unique identifier for this transition. |
| IsDashed | Whether the transition is drawn with a dashed pattern. |
| LineColor | The color of the transition's wire and arrow border. |
| Opacity | The opacity multiplier applied to the transition. |
| RuleCount | The number of rules stacked on this transition. |
| ToState | The state the transition goes to. This is the same state as ITransition.FromState for a self transition. |
| WidthOverride | The line width override applied to the transition. |
| Method | Description |
|---|---|
| AddRule | Creates a new empty transition rule and appends it to this transition. |
| GetRule | Retrieves the rule at the specified index. |
| GetRules | Retrieves the rules stacked on this transition, in the order they appear. |
| RemoveRule | Removes a rule from this transition. |