I have a special scene which acts as a debug overlay displaying various internal stats about my game. I’ve put a few OnGUI buttons onto it, however pressing them doesn’t cause the input to be consumed. In fact, in other parts of the game input is tested in Update() functions and the OnGUI() happens after. I’ve used Debug.Log to output the order of execution, so its not possible to kill input after a button is clicked on, as this is tested last.
I could create my own input manager and try to wrap up the input, but before I head down that route I was wondering what others do.
I could also go down the route and change it to use the new GUI system, however I didn’t think that was necessary as this is just for debugging and won’t be released. I believe the new GUI system allows me to test if the mouse is over a GUI button and I can therefore stop input from being tested by other methods.
Any advice would be appreciated.