Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: blackant on February 28, 2014, 06:10:21 AM
-
Hello,
on my game i use a panel (Z = 0) using scroll view
Below is a dragscroll view without Z information
attached on it, i put series of squares sprites(Z = 1)
Some of this squares have a second sprite (Z = 2)
and when i try to parent a gameObject(Sprite) to this position(Z= 7)
the new object is behind the sexisting prites. i tryed to modify the depth of this sprite in game, but nothing is changing,
but if i put the depth of the panel down, the newest sprite appear.
http://www.youtube.com/watch?v=Xc-z67n895o
-
the bug has been localized
during the game, it is possible to get the sprite in front by changing type, or anchor....
not very logic
-
Z is not used in NGUI 3 unless you use explicit render queues. Everything is sorted by depth.
-
ok, it seems that this problem can only be solved manuall by cliquing in the inspector panel, on something inside the UISprite script
except Depth parameter...
http://www.youtube.com/watch?v=gEi3f3taocY
-
any idea ?
-
I'm having a little bit of trouble understanding your problem and the video had too much going on for me to know how it's supposed to be.
Generally, the drawing order should be determined by first Panel Depth then Widget depth. This means that you cannot easily sandwich widgets from different panels.
You could open the draw order tool or my own tool ( http://www.tasharen.com/forum/index.php?topic=6166.0 ) to see how they are actually being layered. That should help you debug the problem.
-
ok, thanks, i fund the problem using draw order tool.
the card is drawn before and so it's why it's behind the board.