Author Topic: NGUI 3.0.6 f7 cant set the size of sprite.  (Read 1902 times)

badawe

  • Jr. Member
  • **
  • Thank You
  • -Given: 8
  • -Receive: 7
  • Posts: 70
    • View Profile
NGUI 3.0.6 f7 cant set the size of sprite.
« on: December 03, 2013, 10:36:34 AM »
I have a 3D camera, and I use that to render some 2D sprites with Panel.
Everything works in the 3.0 version, but now i update to ngui 3.0.6f7 and i can't set the size of game object again.
The sprite have the size of 20x20 but i want to use in gameplay with the size 1x1;

But in this last version, i cant set to 1x1! Every time i change automatically come back to 2x2! What is going on? I'm missing something?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.0.6 f7 cant set the size of sprite.
« Reply #1 on: December 03, 2013, 08:59:22 PM »
It's a safety precaution. You can change it by modifying UIWidget.minWidth and UIWidget.minHeight. That said, I'd advise you to modify the widget's scale rather than shrinking its width and height down to 1.

badawe

  • Jr. Member
  • **
  • Thank You
  • -Given: 8
  • -Receive: 7
  • Posts: 70
    • View Profile
Re: NGUI 3.0.6 f7 cant set the size of sprite.
« Reply #2 on: December 04, 2013, 02:00:07 PM »
Thanks ArenMook, that´s exactly what I've done.