Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddStateMachineTransition

Utility function to add an outgoing transition from the source state machine to the destination.
Read time 1 minuteLast updated 12 days ago

Definition

AddStateMachineTransition(AnimatorStateMachine)

Utility function to add an outgoing transition from the source state machine to the destination.
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine)

Parameters

sourceStateMachine

The source state machine.

Returns

Type

Description

AnimatorTransitionThe AnimatorTransition transition that was created.

Remarks

The transition asset that is created is added as a sub asset of the state.
An example showing usage of this API can be found at the AnimatorController page.

AddStateMachineTransition(AnimatorStateMachine, AnimatorStateMachine)

Utility function to add an outgoing transition from the source state machine to the destination.
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorStateMachine destinationStateMachine)

Parameters

sourceStateMachine

The source state machine.

destinationStateMachine

The destination state machine.

Returns

Type

Description

AnimatorTransitionThe AnimatorTransition transition that was created.

Remarks

The transition asset that is created is added as a sub asset of the state.
An example showing usage of this API can be found at the AnimatorController page.

AddStateMachineTransition(AnimatorStateMachine, AnimatorState)

Utility function to add an outgoing transition from the source state machine to the destination.
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine, AnimatorState destinationState)

Parameters

sourceStateMachine

The source state machine.

destinationState

The destination state.

Returns

Type

Description

AnimatorTransitionThe AnimatorTransition transition that was created.

Remarks

The transition asset that is created is added as a sub asset of the state.
An example showing usage of this API can be found at the AnimatorController page.