Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AddStateMachine

Utility function to add a state machine to the state machine.
Read time 1 minuteLast updated 10 days ago

Definition

AddStateMachine(string)

Utility function to add a state machine to the state machine.
public AnimatorStateMachine AddStateMachine(string name)

Parameters

name

The name of the new state machine.

Returns

Type

Description

AnimatorStateMachineThe 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

name

The name of the new state machine.

position

The position of the state machine node.

Returns

Type

Description

AnimatorStateMachineThe 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.

position

The position of the state machine node.

Remarks

This function pushes an Undo operation.