Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Gregzo on June 26, 2012, 06:21:17 AM
-
Hi!
Massively upscaling my project thanks to NGUI, awesome!
One strange thing : I have a UISprite and a UILabel both parented to the same object, UILabel.enabled = false.
From a script attached to the UISprite, I do transform.parent.localPosition.y += 10 , then uiLabel.enabled = true.
The transform moves, the children move along, but the label doesn't show. It is enabled allright, simpy doesn't display.
If I don't move the parent through code, but in the inspector, and then manualy enable the label, all is fine.
Hummm...
Thanks for any insights!
Edit : both uiLabel and Sprite are displayed on top of another UISprite. Just found out that my hding label went behind. But no matter how I adjust depth and z, can't get it to show after it's parent has been moved through code.
Edit 2 : sprites and label are in 2 different atlases. adjusting label's z doesn't help...
-
Read this: http://www.tasharen.com/forum/index.php?topic=6.msg238#msg238
Then read this: http://www.tasharen.com/forum/index.php?topic=767.0
-
Thanks, problem solved.
To sum things up : don't use different atlases in the same panel.
Cheers!