Author Topic: Depth Bug [Solved]  (Read 7897 times)

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Depth Bug [Solved]
« 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
« Last Edit: March 03, 2014, 02:35:33 AM by blackant »

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: Z Depth Problem
« Reply #1 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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Z Depth Problem
« Reply #2 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.

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: Z Depth Problem
« Reply #3 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

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: Depth Bug
« Reply #4 on: March 02, 2014, 05:28:16 AM »
any idea ?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Depth Bug
« Reply #5 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.

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: Depth Bug
« Reply #6 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.