Q:

Understanding the camera, getting it to fit 480x800

It might be weird locking on a 480x800 resolution, but I'm having problems understanding the camera in Unity.
I'm trying to build a 2d application with unity 4.3.4, which supports 2d. What I've done Is that I've created a background that is 480x800, but whats confusing is that I cant seem to fit the camera.
If I edit the Size, W and H of the camera, I can get it to fit 480x800 with the values Size=4, W=0.33, H=1. But I think this is really bad approach of the problem.
So how could I do it? I want support a mobile screen size in portrait mode, and with width being atleast 480. The new Samsung galaxy has a 1080 pixels in screenwidth. The ration between screen height and width seems to be 0.5 to 0.6, setting W to be 0.7 and H to be 1 should enable some flexibility?
And when developing for multiple resolutions, what do I do with the background? a 480x800 as I already created would not fit the bill on a 1920x1080 device!?

A:

No matter how you approach this, you'll either:
a) Need a seperate background for each aspect ratio
b) Have parts of your background not be visible when using certain aspect ratios.
There isn't an optimal solution as far as I can see for this sort of problem. The way I approach it is to usually create a background which is wide enough to accommodate the widest possible screen (16:9 logically). The extra background for wide screens is simply ignored on the other aspect ratios. This has the benefit of being quite easy to implement, but depending on your use of the background it may not work for your case.
You could alternatively simply resize the camera, forcing it into the aspect ratio you want (similarly to how you went about it) by calling Camera.aspect = 4f/3f; where 4/3 is the aspect ratio you want. This of course is far from pretty, and will distort the final game, depending on the device you're using.
Finally, the easiest solution by far is to simply set the unity background color to Black, and let it fill in any excess with black strips.

