Author Topic: UIScale act on sliced sprite dimensions  (Read 3140 times)

kjenkins_oculus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
UIScale act on sliced sprite dimensions
« on: December 04, 2013, 05:32:24 PM »
UIScale scales the transform of the object. But with a sliced sprite this results in the edges being scaled. I would instead like the Widget Dimensions to be scaled by the corresponding X / Y scale values, and for the containing game object's scale to remain unchanged. How would I do this? I tried writing a script but I'm not sure which public members to set of UISprite.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScale act on sliced sprite dimensions
« Reply #1 on: December 04, 2013, 05:42:28 PM »
I don't know what UIScale is. Did you mean UIButtonScale?

TweenWidth and TweenHeight can be used to tween the widget's dimensions.

kjenkins_oculus

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: UIScale act on sliced sprite dimensions
« Reply #2 on: December 04, 2013, 08:47:35 PM »
Sorry, yes. UIButtonScale. I'll try TweenWidth and TweenHeight