Support => NGUI 3 Support => Topic started by: Shifty Geezer on May 11, 2016, 05:25:08 AM
Title: Force camera redraw (show loading graphic before level load)
Post by: Shifty Geezer on May 11, 2016, 05:25:08 AM
I'm wanting to show a graphic while the next level loads. Problem is drawing stops the moment I call "LoadLevel". Is there a way to force NGUI to redraw before the next line of code is executed?
publicvoid ButtonPressCareer(){
if(canPlayCareer){
loadingGraphic.SetActive(true);
FORCE_NGUI_DRAW
Application.LoadLevel("club");
}
}
Title: Re: Force camera redraw (show loading graphic before level load)
Post by: Holy Manfred on May 13, 2016, 10:30:18 AM
You can just delay the level loading by a frame or use an Invoke or something...
Title: Re: Force camera redraw (show loading graphic before level load)
Post by: ArenMook on May 14, 2016, 06:37:54 PM
Yeah, I'd also suggest using LoadLevelAsync instead. LoadLevel will stop there, waiting for the level to load, freezing the entire application. That's not a good way to go. LoadLevelAsync lets you keep drawing the scene, showing a loading bar or something similar.