Author Topic: Bunch of stretch questions.  (Read 2147 times)

mikejkelley

  • Guest
Bunch of stretch questions.
« on: October 30, 2013, 11:59:20 PM »
As obvious as the answers may be, I'll make no apologies for asking these questions. It's been a very aggravating day getting to know NGUI.

  • Stretching a sprite doesn't stretch its attached collider?!
  • I can't find a way to constrain proportions for any type of resizing/stretching. What am I missing?
  • Is there a way to tween relative positions (e.g. a credits "label" from the bottom of a screen of any resolution to the top)!?


I've always thought the key and foremost functionality of a GUI was to be able to accommodate various screen resolutions while constraining proportions.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bunch of stretch questions.
« Reply #1 on: November 01, 2013, 08:29:32 AM »
1. Adjust collider is an option on the sprite.
2. UIStretch has a "FillKeepingRatio" style on it.
3. Same as tweening anything else: TweenPosition.Begin. I'd recommend just writing a simple script and putting it on the credits panel though. Inside its update, modify its localPosition by Time.deltaTime * some amount. This is much faster for performance.