Scale a sprite horizontally as well.


I want my GUI elements to scale to fit whole screen. They do scale well when i increase screen height, but they do not scale horizontally.

How can I make them scale horizontally, also I have canvas attached to all my elements and canvas is set to world size.

Please refer to the screenshots so maybe You can see what I mean. I am developing for mobile phones, I know it might look ugly on wider screens but It doesnt matter on moblies.

You need to set the anchors on X to 0 and 1.
I would suggest you take a quick crash tutorial on Unity UI, it’ll save you time.