I wonder why the GUI.Button function doesn’t block the thread until the user cklicked the button and whether GUI.Button creates a new Button every frame. Does it compare the Buttons of the last frame with those of the new frame and treats it two buttons with same content, one of them from the last frame and the other one from the actual, as one button?
OnGUI is immediate mode and runs every frame, similar to Update. Content from the previous frame no longer exists in the current frame.