Author Topic: Depth sorting bug combining empty widgets and clipped panel  (Read 2916 times)

N3uRo

  • Guest
Depth sorting bug combining empty widgets and clipped panel
« on: February 06, 2014, 12:41:54 PM »
Yesterday I was layouting an app and I got disappearing random widgets. I didn't have this problem < 2.7.0 where you had to fight with depth VS Z.

My guess is that is has to be when you use empty widgets (for layouting, creating container, etc...) inside a clipped panel. It seems that it messes depth.

I thought that a UIPanel would ignore a UIWidget depth because it doesn't draw anything but it doesn't seem like that.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depth sorting bug combining empty widgets and clipped panel
« Reply #1 on: February 06, 2014, 09:03:50 PM »
If you have UIWidget containers immediately under the scroll view, currently NGUI uses their bounds to determine if they should be culled or not. It won't consider the children. It's a questionable optimization that I'm likely going to remove as people seem to be running into this.

If you use UIWidget containers immediately under your scroll view, make sure that their bounds actually envelop the contents of their children.

N3uRo

  • Guest
Re: Depth sorting bug combining empty widgets and clipped panel
« Reply #2 on: February 07, 2014, 11:52:39 AM »
I understand that but without any warning, note or something it's a problem that it's very likely to happen to others and when it happens it's very confusing.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depth sorting bug combining empty widgets and clipped panel
« Reply #3 on: February 08, 2014, 03:06:40 PM »
Yup, I agree -- which is why I fixed it in 3.4.9 :)