Main menu canvas at 1.3 aspect ratio is distorted
Hi! I'm having a difficult time with Unity's canvas scaling on multiple resolutions for a main menu scene. I've written custom multi-resolution UI systems before and I am used to simply scaling it so the menu looks the same regardless of the resolution and being done with it. That's what I'm trying to do now with Unity, but it's not working.
When the game is in a 1.6 ratio resolution (like 1440x900) it looks correct, but at any 1.3 ratio resolution (like 800x600) the shapes are distorted. Confusingly, my "Scale with Screen Size" canvas Reference Resolution is 800x600. Why does it look different in game than in the Game preview?!
I've clicked on every checkbox, added the AspectRatioFitter component to everything, watched videos, read forums, and a bunch of other stuff. I cannot figure out why this is happening.
I don't want to use Constant Physical Size, I just want the menus to be the same size relative to the screen, which is what I think Scale With Screen Size should be doing if not for this weird issue with aspect ratio.
It's simple to reproduce with a new scene: set camera to Orthographic, add a canvas, set to Scale with Screen Size with defaults, add a child Panel, resize to make it smaller so you can see it, change anchor to Center (not stretch). Build and run, choose 800x600 resolution. Why does it squish and how do I fix it?
Given that there's a lot of different ratios these days, surely Unity handles this automatically? What am I doing wrong?
Your answer
Follow this Question
Related Questions
Canvas Renderer event 0 Answers
Block Graphic Raycaster on UI child elements 0 Answers
Problem with Images during Method-Call 0 Answers
Render canvas inside Sorting Group 0 Answers
Button custom collider 0 Answers