How to scale correctly between different aspect ratios and resolutions?

How to scale UI elementes correctly between different aspect ratios and resolutions?

I have made this first canvas for 1920*1080

:

When i change aspect ratio, my canvas is not scaling correctly:

How should be a canvas to be responsive?

P.D.: Sorry about my english. Not my native language.

1 Like

Welcome to the community!

You need to properly set your Canvas Scaler, it should be on your main canvas Game Object, if for some reason your canvas doesn’t have a Canvas Scaler component add it, like this:
dwqdwa

Now set your Canvas Scaler to Scale With Screen Size.
dwqdq

Set the Reference Resolution to your target resolution.
dsadqwqe

Remember that Canvas Scaler doesn’t work with Render Mode World Space, you have to set it to Screen Space - Overlay or Screen Space - Camera.
dwqdwq

Thanks for your reply.

It works matching the widh (0 value for scaler match) leaving a lot of void space on top and bottom of the screen, but doesn’t work matching both, width ad hight (original images are whit 0.5 value)

scale

I guess is not possible to make an automatic responsive behaviour so easy…

Hi Oscar,

Maybe you could set the anchor presets for the width.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.

Privacy & Terms