private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Paused = !Paused; if (Paused) { FreezeTime(); } else { UnFreezeTime(); } } Controllable.SetActive(Paused); }