I have an unusual scaling of UI Elements after my build in unity for WebGL
Game in Itch.io:
Has anyone seen this kind of behaviour? any suggestions on what I should look into? Happy to provide more info on the matter.
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
This is due to your Canvas scaling properties. By default the Canvas that you use doesn't scale with the resolution. So if you work in Unity with a small resolution (your game window size defines the resolution you're using, in your case it's a 4:3 ratio resolution but it seems very small), let's say 640x480 and try to play the game after building it on a 1280x1024 screen resolution, your canvas will still be 640x480 and at the middle of the screen.
To avoid that behaviour you can add a component
CanvasScaler on your Canvas and define the behaviour you're expecting (I feel like you want a "Match width or height" mode). You can find more about the Canvas Scaler here.