Search Unity

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

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

  1. ShavSkelet

    ShavSkelet

    Joined:
    Nov 29, 2017
    Posts:
    29
    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

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    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.