I got a function called Spin() that is called when a user press a button drawn on OnGUI(). That function, at some point, says something like this:
The things is that when Unity is waiting for query, the GUI disappears. If if comment that line, the GUI shows perfectly. How I need to write my code in order to have the GUI showing correctly and still wait for the query result?
EDIT: The code is from the function Spin() that's called on OnGUI();
Because the query part is asynchronous, you need to make sure that gets split off into a separate Coroutine, instead of forcing the GUI to wait for it to finish. Keep a boolean variable outside of both functions, that takes care of the yield timing:
answered May 16 '12 at 05:03 AM