1
votes

I have a Unity 2D project with a fixed screen size of 800x450 pixels. I have imported a background image that is also 800x450 pixels. When placed on the stage, the image only takes up half of the screen. The scale of the image is set to 1,1. The Z position is 0.

Why is the image displayed too small? How can I display the image at the correct resolution?

incorrect size

Does this mean that I have to design all my game assets at 2x the required size? Or that I somehow have to set the scale for all imported assets at 2? What is the recommended workflow?

EDIT

I have added a screenshot of the camera settings:

enter image description here

1
If its a uGUI image try "SetToNativeSize" there should be a button in the inspector window. - Marius Junak
No it's just a regular background image for the game. In fact, all game assets appear twice as small as they really are. Why is this? - Kokodoko
I am now suspecting this is an effect of the camera being on the Z plane, 10 units away from my game assets. Should I put the camera at Z position 0? How do other 2d game developers solve this major issue? - Kokodoko
What kind of 'projection' are you using in your camera? Perspective or Orthographic? - mayo

1 Answers

1
votes

I would trying making your camera orthographic, and set the size of the camera (not the transform) to be half the height that you would like it to be (225)

Also if you are looking for pixel perfect game. here is a pretty good article from Unity about how to make that work and it explains some of the camera aspect ratios and scaling

http://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/