Game Resolution and Scaling Unity 2D

I’m currently testing Unity to use it as the engine for my next game.
It’s a 2D platform that will run on PC.

I’m really concern about multi resolution because it’s been an issue before, and some other solutions like Cocos2d-x and XNA have really straightforward approaches to this.

I want the game to have the 16:9 aspect with default resolution being 1920x1080. I also want to keep the aspect, but make it possible to select different resolutions. It’s not a problem if the game will have black bars on top and bottom of the screen when running in different aspects.

I’ve seen some topics about this for mobile games in Unity. I haven’t seen many topics about my issue in particular (Is anybody else doing 2D PC games on Unity?).

I’m using ortographic camera, and so far I’ve been able to get the camera size 5.4 using the formula:

cameraSize = 1080 / 100.0f / 2.0f;

100.0f being the units per pixel value.

Can somebody give me some advice on how to get this to work? This is a really important issue and if I don’t get it right, maybe I’ll have to find another engine.

Thanks for your help!

Go Edit → Project Settings → Player. Under “Standalone Player Options”, check 16:9 Supported Aspect Ratio, and uncheck all others. Then players will only be given option of supported 16:9 resolutions when starting the game.