Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

ITransition

interface in Unity.GraphToolkit.Editor

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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.

Properties

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.

Public Methods

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.