Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

What reason would your default resolution be different than your canvasses?

As a web developer, screen resolutions were so easy to work with. But as a game developer, I hate it lol. As far as I know, fluid layouts such as 100% screen width isn't even a thing. Trying to figure out sizes that scale with every device is not easy, especially since not every device will be your reference resolution or default resolution.

To give the canvas more space to scale on different sizes like 600 x 800. I have it at 550 x 800 with the setting match 80% of the height.

You can program the camera to adjust itself when necessary.  Test the screen width and height and if it's too far from your target, it can change the projection size (orthographic) etc.  Just do a search on setting the camera size in Unity. There are multiple options. 

Wouldn't it be nice if mobile screens all had the same resolution?!

I do know how to change the camera settings in code, but how can I detect a user's resolution in code? Any idea?

There's one example here

Thanks for that. I'll check it out