Author Topic: Why does the collider on the Simple Textbox prefab always reset itself?  (Read 5018 times)

Meltdown

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 56
    • View Profile
I'm using 3.9.0
I have a simple scene with a Panel, I drag the Control - Simple Text Box prefab from the Examples folder onto the panel.

If I adjust the collider on the TextBox prefab, either through adjusting the center or size values, or adjusting it with the edit collider button, as soon as I press play, the collider resets itself to the original position/size.

No matter what i try I cannot adjust it.

Any idea why this happens?

I've also tried breaking the prefab instance from the object, no luck.

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
use the widget "size" width/height values.  the collider will always auto-adjust (if checked on the widget) to accommodate those values.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Yup, as devomage mentioned every widget has the "Auto-adjust collider" checkbox checked by default.