Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: sburgoon on February 01, 2013, 08:15:10 AM
-
I have started seeing an issue with UICheckbox that I don't remember seeing before the last update, but I could be crazy. If I set a UIPanel to active with the checkbox unchecked, and then click the checkbox, the image never updates. I believe it is actually a problem with the draw-call batcher, as if I pause the scene and look at the check-sprite, it is enabled and it's alpha has been turned back on. In addition, if I SetActive false on the panel and then immediately SetActive true, the check will show up. Oddly, it works fine if I activate the panel with the check enabled. I can then uncheck and recheck it without issue until I hide the panel again with it unchecked.
So, to summarize repro steps:
UICheckbox living under a UIPanel
uncheck the checkbox, then NGUITools.SetActive(panel, false)
next, SetActive true to show the UI, and then try to check the box. Clicking it will change the state (and the alpha tween works as well, if you watch the sprite in the inspector), but it never actually draws until you setactive false and then true again.
Currently happening in 4.1, I'll dig up my 4.0.1 laptop and give it a shot there to see if its maybe a new unity issue, and update the post when I find out.
-Sean
-
Confirmed 4.1 issue. Specifically, it's the function HasChanged() in UINode.cs. The new 4.1 optimizations (line 90-94) cause the issue, and if you comment them out (along with the #if #else) and use the old Unity 3/4 code instead, it works fine again in 4.1. Also, fyi, in my 4.0.1 install that code errors out because it tries to use the 4.1 code instead of the 4.0 code. I assume UNITY_4_0 is false for 4.0.1, but I'm not sure.
-Sean
-
Already fixed this one in the Pro version, so Standard release will be a part of 2.3.2.