Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Darkness on February 02, 2016, 05:11:22 PM
-
I have been trying to put various labels on top of sprites, but for some reason the labels won't render on top of the sprites. I set the depth of the sprites to -5 and the labels to -3. Yet, the labels won't render on top of the sprites. Is there something that needs to be done in order to force widgets to render at the right depth? This has been a problem for a while and I really want to get to the bottom on it.
-
Assuming you aren't using NGUI 2, the only reason why -3 would appear below -5 would be different panels being used by the widgets. Camera depth > Panel depth > Widget depth.
-
That's the thing, the widgets are on the same panel. I'm trying to make a ability bar like Diablo, but I want the key used to fire the ability to be in front of the graphic. Everything is on the same panel, yet the text never shows up.
-
How is it created? If you are changing the transform parent at any point without letting NGUI know, that too would cause an issue.
-
I don't move panels without using one of the NGUI scripts (UIPosition, etc.). All UI elements are part of the main scene and aren't created on the fly. Is there something else that would cause problems with how depth is calculated?
-
What's UIPosition? What version of NGUI are you using?
-
What's UIPosition? What version of NGUI are you using?
Sorry. Meant TweenPosition. I should have caught that. Just wanted to state that I only use the Tween scripts you provide to move things. I'm also using the most recent version of NGUI.
-
Then I am back to my original answer. There is no reason for what you're describing. Same panel, same game object layer, latest NGUI, different widget depth = widget with the higher depth will be drawn on top.
-
There there is something wrong, because I'm trying to put the text on top of a sprite and it's not showing up. The depth is right for each object and it's not being drawn. There's obviously something going on, because it should work, but it's not.
-
Well, all I can suggest is submit a repro case for me to look at. You can email it to support [at] tasharen.com