yasirkula / UnityIngameDebugConsole

A uGUI based console to see debug messages and execute commands during gameplay in Unity
MIT License
2.11k stars 221 forks source link

Return back to command after checking out history. #36

Closed UnquotidianVi closed 3 years ago

UnquotidianVi commented 3 years ago

I often when typing commands reference variables from my command history, and it has been bothering me a long time that the command I was typing before checking out history wasn't saved. I am so used to this functionality in PowerShell that it missing really started bugging me.

"commandHistoryIndex" is reset to -1 every time a valid command is typed, so I assumed checking this value would be the best way of determining whether we are looking at the history or not.

yasirkula commented 3 years ago

Thank you for the pull request! I'm closing it because I've resolved this issue in a slightly different way in the latest commit.