Author Topic: UIWidget OnInit change in v3.6.4  (Read 1234 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 17
    • View Profile
UIWidget OnInit change in v3.6.4
« 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:
  2.                 if (!Application.isPlaying) Update();
  3. #endif
I revert it to simple
  1. Update();
like in 3.6.3 version and everything works fine.
Could you please describe this strange change in 3.6.4?
« Last Edit: June 24, 2014, 12:24:37 PM by LightStorm »


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIWidget OnInit change in v3.6.4
« Reply #1 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.