- Home /
Seeing different amounts of the game in different resolutions
I am making a little simple 2d mars lander type game with Unity's new 2D capabilities, but I've noticed an issue. In the standalone player different resolutions almost act like they change the camera size in the game along with it.
Heres how I want the game to look:
But in different resolutions like a 16:9 one seems to expand the camera with the resolution.
anyone know how to keep the camera the same size while also being able to change resolution?
In Unity, the camera see the same vertical size, and the horizontal size is adjusted as the aspect ratio changes. If you want something different, you will need some code to make changes to the camera or to objects in the scene. Common solutions:
Build out the 'scene' so that there is more to the left and right.
Attach a script to the camera that reverses the logic: horizontal remains the same, and vertical changes.
Change the projection matrix to stretch/shrink the graphics to fit at all resolutions.
Scale critical objects to fit the resolution.
Your answer
Follow this Question
Related Questions
resolution on android 0 Answers
Resolution Issue After Build -1 Answers
Keep same resolution as FreeAspect unity 1 Answer
problem with building my game 1 Answer
How to convert GameObject array to Transform array in C#? 2 Answers