protected virtual void OnStartAgent(bool isInit) { m_movement = GetComponent<MovingAgent>(); m_isWaiting = m_movement.enabled; m_gameInstance = Game.Instance; if (isInit) m_startingNode = m_movement.AtNode ? m_movement.AtNode : m_movement.ClosestNode; else m_movement.TeleportTo(m_startingNode); }