make every player see the same picture with different aspect ratios?

I’m working on a 2D game right now, where it is very important that you have the same picture on your screen even with different screen ratios. Lately is stumbled upon the problem that Unity simply crops out everything that does not fit on the screen, so i tried to figure out a way to solve this problem. The free aspect of the camera is nearly 22 / 9, so the script simply compares the resolution of the script to this 22 / 9 ratio and makes the orthographic size of the camera bigger so everybody sees the same in width. The height varies though. Is that the only way or are there other and better ways out there to solve the problem?

	float cameraratio = 22 / 9;

	float screenwidth = Screen.width;

	float screenheight = Screen.height;

	float screenratio = screenwidth / screenheight;

	float multiplier = cameraratio / screenratio;

	camera.orthographicSize = camera.orthographicSize * multiplier;

look at the Canvas Scaler component on your UI Canvas.

I believe what @elenzil is trying to say is: you said this is a 2D game, the picture you are talking about should be an “image” on the canvas of a 2D game. Once you have this you could take a look at the Canvas Scaler component of the canvas to possibly get the desired affect you are looking for.

Please correct me if I’m wrong, but I believe this is what he was getting at.