Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: vallcrist on December 17, 2013, 09:24:14 PM
-
Hello there.
I believe this might be an easy thing, but i've been searching and trying lots of modifier key combinations, and i can't find a way to resize a sprite keeping the aspect ratio, like i want it bigger or smaller but without deforming it.
I know this is not the best way, usually you want the sprites to be the perfect size in order to stay crisp and occupy the smallest space in the atlas, but sometimes we have to try various sizes in order to decide which is the final..
So, any tips?
-
Prior to 3.0.7 you use UIStretch to accomplish this. Although they're deprecated, there should be some older videos floating around out there that describe how to set these up, and you can check out their pages in the documentation subforum.
(does anyone have any reasons these shouldn't be used if you need to keep the aspect ratio? I know they shouldn't be used with the new anchoring system)
In 3.0.7 the anchoring system was replaced, which replaced UIAnchor and UIStretch. Unfortunately, the corresponding features that kept aspect ratio in tact were not (yet) implemented. See http://www.tasharen.com/forum/index.php?topic=7092.msg33495#msg33495
-
Hey chir, thanks for the reply.
I'm afraid that's not what i need, tho.
I mean small resizes to adjust the size of an sprite, as if we used the Unity Scale tool and clicked in the white cube in the middle. This does work, but it's far from optimal since when i do this I modify the scale of the widget, which isn't a good thing, afaik.
-
Ah, now I get it. I don't have an answer, but I agree it would be a nice feature.
-
It's a planned feature. I just haven't gotten around to it, but will be adding it within the next ~3 weeks. I'm currently focusing on pimping out input fields, and it's going sloooow...
-
Any news about this feature? I agree that this would be a pretty awesome addition to the handle system.
-
You can currently specify an aspect ratio on widgets, and if an aspect ratio is specified, it will be respected when you resize the widget.
-
Ah yes, I see now! Just what I needed, thanks 8)