Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RemoveState(IState)

Removes a state from the state machine.
Read time 1 minuteLast updated 12 days ago

Definition

public void RemoveState(IState state)

Parameters

state

The state to remove. Must belong to this state machine.

Remarks

Removing a state also removes any transitions connected to it. Enclose this method with StateMachine.UndoBeginRecordStateMachine and StateMachine.UndoEndRecordStateMachine to add this operation to the undo stack and to update the graph view with the changes.