Author Topic: PROBLEM WITH WIDGET AND UNIFORM SCALE  (Read 7003 times)

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
PROBLEM WITH WIDGET AND UNIFORM SCALE
« on: April 06, 2016, 04:38:17 AM »
Reducing scale uniformly any widget, from buttons to scrollbars the collider will not turn properly and move from their center. I just plain do not do anything I create widgets that work but not just change the proportion, every time I have to rearrange the colliders. Where am I doing wrong?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PROBLEM WITH WIDGET AND UNIFORM SCALE
« Reply #1 on: April 06, 2016, 03:14:53 PM »
This sounds like a Unity usability issue, not an NGUI question. You probably have the gizmo pivot set to "Center" instead of "Pivot" like in the attached screenshot. All NGUI widgets rotate and scale around the pivot point chosen in inspector which is one of 9 points (top left, center, bottom right, etc).

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: PROBLEM WITH WIDGET AND UNIFORM SCALE
« Reply #2 on: April 06, 2016, 03:55:04 PM »
This happen when i create any widget, i look for center on widget or other cmbinations or for center/pivot of the gameObject but result is the same.
Another Issue is that i make colliders how i need but when execute in run and use it colliders after stop excution return in editor how you see in photo. Please help me i cant work.
Anther is that when i set position of collider on a uiSPRITE at 0,0,0 it don't round sprite in his position and is not centered with sprite.
« Last Edit: April 07, 2016, 05:41:26 AM by pcutile »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PROBLEM WITH WIDGET AND UNIFORM SCALE
« Reply #3 on: April 07, 2016, 05:07:08 PM »
You should not be using the widget tool anymore... it was deprecated ~2 years ago. Look at the warning message it shows in inspector. It's telling you to use the example prefabs that come with NGUI.

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: PROBLEM WITH WIDGET AND UNIFORM SCALE
« Reply #4 on: April 08, 2016, 05:26:45 PM »
yes i have tried it and in my scene happen the same with prefab.
in other scene no, but in mine i have the same result in previous screen shot.
With prefab i see You can't place widgets on a layer different than the UIPanel that manages them.
If you want to move widgets to a different layer, parent them to a new panel instead.
i simpy add it where i want add with widget wizard, but if i use wizard error don't appear.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: PROBLEM WITH WIDGET AND UNIFORM SCALE
« Reply #5 on: April 08, 2016, 08:26:56 PM »
You can change the layer to what you need it to be. Drag the prefab into the scene, select it in the Hierarchy, change the layer.

If one scene works and another doesn't, then the obvious suggestion is to look at the two scenes and to find out what's different about them -- such as your camera set up.