void Update() { if (Input.GetKeyDown(KeyCode.F1)) { DisplayPanel.SetActive(!DisplayPanel.activeInHierarchy); ConsoleOpen = DisplayPanel.activeInHierarchy; if (ConsoleOpen) { CommandInput.ActivateInputField(); CommandInput.Select(); } } }