I'm wondering how to keep an aspect ratio, IDK how to explain but like they say a picture is worth a thousand words(they are phones the black is the screen, and the green is the space that my game should use.) My games aspect ratio is 3:2:
Use two cameras, background "LetterBox"-camera just to draw back background (set clear flags to Solid Color) and Main camera for actual rendering. Then set the main camera dimensions accordingly: Code (csharp): public void CalculateMainCameraDimensions() { // Maintain the 16:10 aspectratio using letterboxing (vertical or horisontal depending screen dimensions) if (LetterboxBgCamera.aspect < 1.6f) { MainCamera.rect = new Rect(0f, (1.0f - LetterboxBgCamera.aspect / 1.6f) / 2.0f, 1.0f, LetterboxBgCamera.aspect / 1.6f); } else { MainCamera.rect = new Rect((1.0f - 1.6f / LetterboxBgCamera.aspect) / 2.0f, 0, 1.6f / LetterboxBgCamera.aspect, 1.0f); } } You can call this every frame and test it live in editor by changing game view dimensions.... BR, JFo