After pressing ESC, have to press backtick twice before console shows up
ttay24 opened this issue · 1 comments
I think it has to do with the focus of the window.
If I have focus on the console and hit ESC, the window disappears, but then I have to press twice before the console shows up. If I have the focus on the console and hit ESC, but then click on visual studio (or something other than Unity to change the focus), then come back to Unity, I only have to press
once
Just to confirm it and adding that I have to press three times after first ESC and two times when returning from visual studio. I configured the character 'q'
void Update () { if (Input.GetKeyDown(KeyCode.Q)) { ToggleConsole(); } }
Because I use 'q' I use the workaround to close/hide the window on 'q' instead of 'Escape' (Escape also stops unity and is not desired for me). Also in ConsoleToggler.cs I directly call ConsoleOpenAction.Activate();.
It is just a workaround.
class ConsoleGUI
private void HandleEscape() { if (KeyDown("q"))) { escapeAction.Activate(); input = ""; } }
class ConsoleToggler
void Update () { if (Input.GetKeyDown(KeyCode.Q)) { //ToggleConsole(); ConsoleOpenAction.Activate(); } }