Author Topic: 2.70 depth sort  (Read 4528 times)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
2.70 depth sort
« on: September 30, 2013, 07:19:43 PM »
I've been battling all sort of glitches for the past week since I've switched to 2.70 and now it's too late to go back so let's try to fix this stuff - depth at least.

video illustrating bug/oddity https://www.youtube.com/watch?v=qychF11jFTw

-what is depth sort - in comparison with the old behavior - I noticed in the past that sometimes moving in z a widget would make it overlap, other times, not, now it's consistent but still doesn't work all the time: play and edit mode are different.

-with depth sort on, can there be a panel inside a panel? if so how does panel sorting work since panels don't have a depth?

- why is the green square representing the panel displaying far behind the root of the panel?

- when a panel is in the pre 2.70 mode (I defaulted back to it) when you move a widget in z, suddenly a group of widget will snap in front/back of another group... what is the logic of it?


Oh and it would be nice to have custom inspectors work with multi selection (and I'm glad you're not allowed to make fancy inspectors in the Unity UI ;-)
« Last Edit: September 30, 2013, 08:21:23 PM by laurentl »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.70 depth sort
« Reply #1 on: September 30, 2013, 08:20:44 PM »
In 2.7, everything works as it did before unless you have "depth sort" checked on panels. If you have it checked on one, you should check it on all of them, or it won't work correctly. If it's turned on, Z will have no effect at all, and the draw order will be consistent, and based solely on depth.

3.0 takes this one step further and will actually break up draw calls for you in order to draw things in a proper order, and there is also no way to use Z anymore (it's 100% depth-based).

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: 2.70 depth sort
« Reply #2 on: September 30, 2013, 08:23:15 PM »
Then in 3.0 and 2.7x you NEED to add depth in panel.

Because I have panels with 20 widgets in them, I use Z to move them in front/behind other groups of widget, with sort=on I have to change the depth of 20 widgets.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.70 depth sort
« Reply #3 on: September 30, 2013, 08:24:28 PM »
No, you don't. Select the root panel, NGUI menu -> Selection -> Bring to Front.

Try using the system before saying it doesn't work. :P

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: 2.70 depth sort
« Reply #4 on: September 30, 2013, 08:29:49 PM »
There is no such menu item (see attachment)

laurentl

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 188
    • View Profile
    • McDROID
Re: 2.70 depth sort
« Reply #5 on: September 30, 2013, 08:31:06 PM »
(so yes the system doesn't work ;)

Bring To Front changes an internal depth value, correct?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.70 depth sort
« Reply #6 on: September 30, 2013, 08:31:31 PM »
Of course there isn't. It's a 3.0 feature, just like the rest of depth related changes. Told you, if you want 2.7 to behave as it did before, don't use "depth sort" option on the panels.