StateMachine<TKey, TState>.

TryResetState(TKey) Method

Summary

Attempts to enter the state registered with the specified `key` and returns it if successful.
Assembly
Animancer.dll
Namespace
Animancer.FSM
Containing Type
StateMachine<TKey, TState>

Syntax

public TState TryResetState(TKey key)

Remarks

This method does not check if the `key` is already the Animancer.FSM.StateMachine`2.CurrentKey. To do so, use Animancer.FSM.StateMachine`2.TrySetState(`0) instead.

Parameters

Name Type Description
key TKey

Return Value

Type Description
TState