Support => NGUI 3 Support => Topic started by: LightStorm on June 24, 2014, 09:06:11 AM
Title: UIWidget OnInit change in v3.6.4
Post by: LightStorm on June 24, 2014, 09:06:11 AM
Hi Aren.
I've updated my NGUI from version 3.6.3 to latest 3.6.5 and get a problem. My project has several scenes that are loaded asynchronously and program can switch between them by disabling old scene and then immediately enabling new scene. After 3.6.5 update I noticed that there is a small gap in render with completely blank screen when scenes are switched. And this problem is present only in built project and not in the Unity Editor. It looks like the first Update of all widgets in the scene is always skipped and they are not drawn or something.. I found this change in UIWidget.cs OnInit() code:
#if UNITY_EDITOR
if(!Application.isPlaying) Update();
#endif
I revert it to simple
Update();
like in 3.6.3 version and everything works fine. Could you please describe this strange change in 3.6.4?
Title: Re: UIWidget OnInit change in v3.6.4
Post by: ArenMook on June 25, 2014, 05:01:25 AM
Tentatively, yes. However note that there is a function that immediately refreshes the UI properly for you: NGUITools.ImmediatelyCreateDrawCalls. You should use that instead if you want the UI to be created immediately without any delay.