Author Topic: Buttons sprites auto-adjust to match  (Read 2611 times)

Nubeh

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 41
    • View Profile
Buttons sprites auto-adjust to match
« on: October 29, 2013, 04:51:25 AM »
There's something a bit annoying about NGUI buttons: if you move the anchor of a button or switch between iOS to Android build all the buttons colliders position gets ruined. Of course I can select each button one by one and chose NGUI -> Add Collider to reset the position, but it gets tedious when my scene has 30-50 buttons.

I noticed that the new NGUI 3.0.3 has an 'auto-adjust to match' option on sprites...but in case of buttons I don't need the background to have a collider, I need the Button object to have one in order to listen for onPress events.

Is there a way to having the colliders resizing and repositioning themselves on button objects automatically?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Buttons sprites auto-adjust to match
« Reply #1 on: October 29, 2013, 04:53:55 PM »
Pivot change I can understand, but what does switching to a mobile platform have to do with it? Collider sizes don't get updated unless you make them get updated either via the option on the widgets, or by doing so yourself.