Is there an easy way to disable mouse input when the function OnGUI() is called? I know I can flip a bool when the function is called, however, there is no OffGUI() function to reset the boolean value when the mouse isn't on a GUI. Whats happening now is that I left click on the GUI but it still does the other scripts on left click due to IfMouseButtonDown(0) being triggered in the Update loop. Any ideas to disable mouse clicking when hovering on a GUI?
Set a global boolean if the mouse is inside the GUI's window. Then check that value in any script that looks for mouse-downs, to ignore if that boolean is set (meaning, if the mouse is over that GUI window).