StateExtensions.

ForceEnterState<TState>(TState) Method

Summary

[Animancer Extension] Calls Animancer.FSM.IState.OnExitState on the Animancer.FSM.StateMachine`1.CurrentState then changes to the specified `state` and calls Animancer.FSM.IState.OnEnterState on it.

This method does not check Animancer.FSM.IState.CanExitState or Animancer.FSM.IState.CanEnterState. To do that, you should use TrySetState instead.
Assembly
Animancer.dll
Namespace
Animancer.FSM
Containing Type
StateExtensions

Syntax

public static void ForceEnterState<TState>(this TState state) 
    where TState : class, IOwnedState<TState>

Type Parameters

Name Description
TState

Parameters

Name Type Description
state TState

Return Value

Type Description
void