AddStateMachine
Utility function to add a state machine to the state machine.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Animations
- Assembly: UnityEditor.CoreModule
AddStateMachine(string)
Utility function to add a state machine to the state machine.
public AnimatorStateMachine AddStateMachine(string name)
Parameters
The name of the new state machine.
Returns
Type | Description |
|---|---|
| AnimatorStateMachine | The newly created AnimatorStateMachine state machine. |
Remarks
The state machine asset that is created is added as a sub asset of the state machine.
An example showing usage of this API can be found at the AnimatorController page.
AddStateMachine(string, Vector3)
Utility function to add a state machine to the state machine.
public AnimatorStateMachine AddStateMachine(string name, Vector3 position)
Parameters
Returns
Type | Description |
|---|---|
| AnimatorStateMachine | The newly created AnimatorStateMachine state machine. |
Remarks
The state machine asset that is created is added as a sub asset of the state machine.
An example showing usage of this API can be found at the AnimatorController page.
AddStateMachine(AnimatorStateMachine, Vector3)
Utility function to add a state machine to the state machine.
public void AddStateMachine(AnimatorStateMachine stateMachine, Vector3 position)
Parameters
The state machine to add.
The position of the state machine node.
Remarks
This function pushes an Undo operation.