I have a Model Viewer program that can load several different Hi-poly models. I run a script on each model to add things to it for use on the screen (each part has a gizmo script and collider added/verified)
I have a series of button created in the ONGUI, one is to list the models you can load. That is a spawned Window from the ONGUI. The buttons in there calls the LoadModel Function, which instantiates the prefab and then calls a separate script to do some more work.
In the meantime, I wanted a LOADING… Texture to appear, but it does not appear until the model is done (meaning it waits until all the work is done)
So the function calls are stalling any GUI redraws.
My Question is, how do i force the GUI to put up the message LOADING… before doing the work to load the models. (so the user is not wondering what is going on for the 4-6 seconds it seems to be doing nothing and presses the button again!)
The ONGUI function calls seem to be stalled while the load and other script are running, like control has been given to them before continuing the normal cycle.
I can fix this with a series of booleans and work arounds, but figured there might be
a force REDRAW or some kind of command, but can’t seem to find that…
Any suggestions?