Here's what I don't understand about Events:
the documentation says that
Events correspond to user input (key presses, mouse actions), or are UnityGUI layout or rendering events. For each event OnGUI is called in the scripts; so OnGUI is potentially called multiple times per frame. Event.current corresponds to "current" event inside OnGUI call.
the documentation pertaining to onGUI states that it has
one call per event
That doesn't make sense to me, because I know I can call Events within OnGUI.
I have an OnGUI function that draws a grid using x and y nested for loops, then checks using
Event.current.mousePosition if your mouse is hovering over a grid block. What I don't get is how OnGUI is ever called, if OnGUI is only called when an event occurs, but I have the event inside OnGUI so how can you ever check if the event is being called inside a script that is only called after the event is called?
I know that probably sounds confusing -- I'm just puzzled by the seemingly cyclical nature of ongui.