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
- Type: Method
- Namespace: UnityEditor.Animations
- Assembly: UnityEditor.CoreModule
AddStateMachineTransition(AnimatorStateMachine)
Utility function to add an outgoing transition from the source state machine to the destination.
public AnimatorTransition AddStateMachineTransition(AnimatorStateMachine sourceStateMachine)
Parameters
The source state machine.
Returns
Type | Description |
|---|---|
| AnimatorTransition | The 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
The source state machine.
The destination state machine.
Returns
Type | Description |
|---|---|
| AnimatorTransition | The 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
The source state machine.
The destination state.
Returns
Type | Description |
|---|---|
| AnimatorTransition | The 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.