public async Task StartWithState(TStateType stateType) { _currentState = _transitionManager.GetStateByType(stateType); await _currentState.RunState(); do { _currentState = _transitionManager.GetNextState(_currentState, _context); await _currentState.RunState(); } while (!_currentState.IsExitState); Debug.Log($"Finish State machine {GetType().Name}"); }