StateExtensions.

TryEnterState<TState>(TState) Method

Summary

[Animancer Extension] Attempts to enter the specified `state` and returns true if successful.

This method returns true immediately if the specified `state` is already the Animancer.FSM.StateMachine`1.CurrentState. To allow directly re-entering the same state, use Animancer.FSM.StateExtensions.TryReEnterState``1(``0) instead.
Assembly
Animancer.dll
Namespace
Animancer.FSM
Containing Type
StateExtensions

Syntax

public static bool TryEnterState<TState>(this TState state) 
    where TState : class, IOwnedState<TState>

Type Parameters

Name Description
TState

Parameters

Name Type Description
state TState

Return Value

Type Description
bool