- Home /
[4.6 - UI] Keep aspect ratio
I want to create HUD in my game using new UI system. It is an image in the shape of circle. I want this to be scalable, so it would fit to screen width. But I cannot make this without streching my hud, so it is no longer circular.
How to make it scalable and keep its aspect ratio?
Here are my settings:
Answer by Landern · Oct 12, 2014 at 02:34 PM
Have you added a ReferenceResolution component?
Also be mindful of your anchors
You can also use AspectFitter its a component that will keep your images aspect ratio. :)
Answer by shriya · Dec 23, 2014 at 07:13 AM
HI,
You can try editing sprite you are using through sprite editor. For details refer the mentioned link and look for 9-Slice Scaling : http://www.raywenderlich.com/78675/unity-new-gui-part-1
Hope it helps