Author Topic: Sprites depth problem  (Read 5666 times)

Clicker

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Sprites depth problem
« on: December 28, 2013, 07:39:44 AM »
After upgrading NGUI from 3.0.7 f3 to 3.0.8 I have noticed that after enabling sprites via NGUITools.SetActive function, the sprites are rendered as if they were over all other sprites of the same atlas in the panel (the depth behaviour isn't correct). This strange behaviour can be avoided if I call Panel.Refresh method, but it is not actually convenient and it needs a lot more code to manage the problem. Also, if I call NGUITools.SetActive for other widgets(buttons, sprites etc.) on the same panel, the sprites with wrong depth somehow become correct. Is there another way to deal with this problem, maybe better than I described above?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sprites depth problem
« Reply #1 on: December 28, 2013, 04:42:26 PM »
Could you provide me with some repro steps to follow for this one? Seems two people have run into this one, but I'm not sure how to reproduce it on my end.

MooseMouse

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Sprites depth problem
« Reply #2 on: December 29, 2013, 09:22:20 AM »
I am also having a depth sorting problem since upgrading to 3.0.8 this morning. Unfortunately I am not able to provide a sample with the problem at this time, but I am using SetActive() as the OP is.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sprites depth problem
« Reply #3 on: December 29, 2013, 07:41:22 PM »
Alright, I've investigated it, found the issue and fixed it in 3.0.8 f2. Grab the update and let me know if something is still broken.

MooseMouse

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Sprites depth problem
« Reply #4 on: December 30, 2013, 08:23:43 AM »
That fixed the problem for me. Thanks  :)

It uncovered a new, possibly related problem, but I will start a new thread for that.