Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ITransition

Interface for a transition in a StateMachine.
Read time 1 minuteLast updated 6 days ago

Definition

public interface ITransition

Remarks

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

FillColorThe fill color of the transition's arrow.
FromStateThe state the transition originates from.
IconThe icon displayed for this transition in the transition inspector, or
null
if none is set.
IDThe globally unique identifier for this transition.
IsDashedWhether the transition is drawn with a dashed pattern.
LineColorThe color of the transition's wire and arrow border.
OpacityThe opacity multiplier applied to the transition.
RuleCountThe number of rules stacked on this transition.
ToStateThe state the transition goes to. This is the same state as ITransition.FromState for a self transition.
WidthOverrideThe line width override applied to the transition.

Methods

Method

Description

AddRuleCreates a new empty transition rule and appends it to this transition.
GetRuleRetrieves the rule at the specified index.
GetRulesRetrieves the rules stacked on this transition, in the order they appear.
RemoveRuleRemoves a rule from this transition.