Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: blackant on February 28, 2014, 06:10:21 AM

Title: Depth Bug [Solved]
Post 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
Title: Re: Z Depth Problem
Post by: blackant on February 28, 2014, 06:35:04 PM
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
Title: Re: Z Depth Problem
Post by: ArenMook on February 28, 2014, 06:45:31 PM
Z is not used in NGUI 3 unless you use explicit render queues. Everything is sorted by depth.
Title: Re: Z Depth Problem
Post by: blackant on February 28, 2014, 07:30:14 PM
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
Title: Re: Depth Bug
Post by: blackant on March 02, 2014, 05:28:16 AM
any idea ?
Title: Re: Depth Bug
Post by: Nicki on March 02, 2014, 08:09:28 AM
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.
Title: Re: Depth Bug
Post by: blackant on March 03, 2014, 02:35:15 AM
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.