Summary
Attempts to enter the state registered with the specified `key` and returns it if successful.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.FSM - Containing Type
- IKeyedStateMachine
<TKey>
Syntax
Object TrySetState(TKey key)
Remarks
This method returns true immediately if the specified `key` is already the
Animancer.FSM.IKeyedStateMachine`1.CurrentKey
. To
allow directly re-entering the same state, use Animancer.FSM.IKeyedStateMachine`1.TryResetState(`0)
instead.
Parameters
Name | Type | Description |
---|---|---|
key | TKey |
Return Value
Type | Description |
---|---|
Object |