Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Can't set the aspect ratio to 16:9

Discussion in 'UGUI & TextMesh Pro' started by ShavSkelet, Apr 12, 2022.

  1. ShavSkelet


    Nov 29, 2017
    So Im making a 2D game using UI, this game is for all the platforms and one of them is mobile. But I want the app to force the 16:9 aspect ratio. I just want black bars to appear when the mobile has a large screen. On the game window on unity I see the black bars (using the same resolution as the mobile), but when I make the build on mobile the app force the wide resolution making all stretch. Is there any way to force the aspec ratio?

    Things that i tried:
    -Setting the canvas scaler to Scañe with screen setting the reference resolution to 1920:1080, screen mathc modes that i tried --> Expand, match with height width
    -Using a panel inside the canvas with the Aspect ratio fitter and setting it to fit in parent , aspec ratio 1.77777777 (16:9)
    -Project settings, set the fullscreen mode to windowed and full screen.
    -Tried all the differents options on the Supported aspect ratio section.
    -Donwload the asset auto letterbox wich "forces" the camera to a certain aspect ratio, but maybe it doesnt work with UI.

    Hope you can help me with that. And thank you in advance.
  2. AcidArrow


    May 20, 2010
    I don't have an answer for the issue, just a warning that this (black bars) can be a rejection reason for iOS.

    Not sure about Android.