Canvas background not scaling properly

I have a background that is compiled of 7 PNG images, but for bigger or smaller screens it will not fit correctly. I have tried numerous ways to fix this issue but can’t seem to find out how to fix his issue.

Expected result when scaling screen

Actual result when scaling screen

Does anyone know how to fix this issue? Please let me know!

Extra images


Your Canvas Scaler component is set to “Constant Pixel Size” - that’s why it is not scaled at all.
Reading - Canvas Scaler | Unity UI | 1.0.0

2 Likes

Thank you! I have seen this everywhere and I did understand that that was the issue, but I never understood what the “Reference resolution” was, and with the document you mentioned its now fixed!

Nice banana!

Here are some more notes on UI Anchoring, Scaling, CanvasScaler, etc:

https://discussions.unity.com/t/845782/4

https://discussions.unity.com/t/848795/5

Also, please note that the 2D forum is not about UI and there’s a dedicated forum for it you can use here,