// Update is called once per frame void Update() { if (_currentAgent == null && _controlledCharacter != null) { _currentAgent = _controlledCharacter.gameObject.GetComponent <NavMeshAgent> (); } if (!_inputFrozen) { if (Input.GetKeyDown(KeyCode.Backspace)) { _partyController.Next(); _currentAgent = _controlledCharacter.gameObject.GetComponent <NavMeshAgent> (); } } }