protected virtual void Start() { if (m_currentRunningState != null) { m_currentRunningState = Instantiate(m_currentRunningState); m_currentRunningState.Init(m_actor); } }
private void ChangeToNextState() { m_currentRunningState.OnExit(); ScriptableObject _waitForDestroy = m_currentRunningState; m_currentRunningState = Instantiate(m_currentRunningState.NextState); Destroy(_waitForDestroy); m_currentRunningState.Init(m_actor); }