Author Topic: Problem visualising panel bounds?  (Read 3867 times)

dlewis

  • Guest
Problem visualising panel bounds?
« on: August 13, 2012, 07:55:40 AM »
I've noticed that ever since the update which added better visualisation of panel bounds for selected widgets I've been unable to reliably see clipping information for selected panels.

In my test scene I have a new 2D UI and when I select the panel, turn on hard clipping and start moving X and Y size I don't see the purple box for the clipping bounds. When I add and select a game object under the panel I can see the bounds but never when I've got the panel itself selected (which makes it basically impossible to size the clipping by eye).

Any chance of getting this fixed?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem visualising panel bounds?
« Reply #1 on: August 13, 2012, 09:03:52 AM »
Hmm? I just double-checked, selecting the panel shows its rectangle just fine, whether it's clipped or not. If it has clipping, the rectangle is magenta-colored. If it doesn't, then it's purple.

dlewis

  • Guest
Re: Problem visualising panel bounds?
« Reply #2 on: August 13, 2012, 07:46:49 PM »
Strange. I just double checked again myself by redownloading ngui off the asset store into a blank project and I still can't see the clipping bounds when I have the panel selected...

Thinking about it more, if I'm the only one with this problem is may be a problem with Unity 4.0 beta X.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem visualising panel bounds?
« Reply #3 on: August 13, 2012, 08:14:19 PM »
Just one of many things Unity broke, I guess. I'll make note of it.

Lando

  • Guest
Re: Problem visualising panel bounds?
« Reply #4 on: August 14, 2012, 09:09:55 AM »
sorry if this is pointing out the obviously but on your UIpanel script have you got debug info set to gizmos!?

PhilipC

  • Guest
Re: Problem visualising panel bounds?
« Reply #5 on: August 14, 2012, 09:23:22 AM »
After looking into it Unity is not calling the OnDrawGizmos when the object is selected in the hierarchy. Same issue happens in other places. I tried using OnDrawGizmosSelected which would call the OnDrawGizmos and this does work but its not very clean nor does it follow what unity says is the proper behavior for OnDrawGizmos.

I have reported this as a bug to unity.

PhilipC

  • Guest
Re: Problem visualising panel bounds?
« Reply #6 on: September 13, 2012, 12:41:03 PM »
Just a FYI, Unity has responded to me and they say that it should be fixed for the next version of Unity 4 Beta. If you see if happen again let me know and we can report another bug.