Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetTransitions(IState, IState)

Retrieves the transitions that connect one state to another.
Read time 1 minuteLast updated 13 days ago

Definition

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

Parameters

fromState

The state the transitions originate from.

toState

The state the transitions go to.

Returns

Type

Description

IEnumerable<ITransition>An
IEnumerable
of the ITransitions 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() and IState.GetOutgoingTransitions().