Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddAnyStateTransition

Utility function to add an AnyState transition to the specified state or statemachine.
Read time 1 minuteLast updated 12 days ago

Definition

AddAnyStateTransition(AnimatorState)

Utility function to add an AnyState transition to the specified state or statemachine.
public AnimatorStateTransition AddAnyStateTransition(AnimatorState destinationState)

Parameters

destinationState

The destination state.

Returns

Remarks

The transition asset that is created is added as a sub asset of the state machine. Its important that AnyStateTransitions are added to the root state machine. AnyStateTranistions added to a sub state machine will be discarded at runtime. This function pushes an Undo operation.

AddAnyStateTransition(AnimatorStateMachine)

Utility function to add an AnyState transition to the specified state or statemachine.
public AnimatorStateTransition AddAnyStateTransition(AnimatorStateMachine destinationStateMachine)

Parameters

destinationStateMachine

The destination statemachine.

Returns

Remarks

The transition asset that is created is added as a sub asset of the state machine. Its important that AnyStateTransitions are added to the root state machine. AnyStateTranistions added to a sub state machine will be discarded at runtime. This function pushes an Undo operation.