Search Unity

How to restrict game by minimum aspect ratio

Discussion in 'Android' started by Loomabox, Aug 19, 2019.

  1. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    40
    Hi there!

    Is there a way to set and restrict a game based on a minimum (NOT MAXIMUM) aspect ratio?

    3:2=1.5 OK
    16:9=1.7 OK
    16:10=1.6 OK
    18:9=2 OK

    4:3=1.3 NOT OK
    5:4=1.25 NOT OK

    My game looks ok on screens with a minimum aspect ratio of 1.5. Anything lower, like 1.4, 1.33333, 1.2 is not acceptable.

    Is it possible to build a game in Unity 5 with the minimum aspect ratio restriction in such a way that Play Market will not allow installing the game on devices with aspect ratio lower than 1.5.

    Regards
    LoomaBox
     
  2. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    40
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    6,936
    Why can't you just force a specific aspect ratio on devices which prefer an unacceptable one? Do letterbox or something.
     
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,358
    Yeah, this is exactly what I'm doing with my current game and it's been working out great in testing.
     
    Ryiah and Joe-Censored like this.
  5. HavenbrookStudio

    HavenbrookStudio

    Joined:
    Aug 18, 2019
    Posts:
    7
    According to your link (https://support.google.com/googleplay/android-developer/answer/7353455?hl=en)

    By manually excluding devices with known compatibility issues, you can help provide a better experience for your users.

    Exclude a device
    1. Sign in to your Play Console.
    2. Select an app.
    3. On the left menu, select Release management > Device catalog.
    4. Select a device.
    5. At the bottom of your screen, select Exclude.
    Use the same excluded devices as another app
    1. Sign in to your Play Console.
    2. Select an app.
    3. On the left menu, select Release management > Device catalog.
    4. Select the Excluded devices tab.
    5. Next to "Import manually excluded devices," select an app.
    6. Select Import.
    Set up exclusions for a device with multiple models
    1. Sign in to your Play Console.
    2. Select an app.
    3. On the left menu, select Release management > Device catalog.
      • If your app hasn’t been published yet, select Device catalog.
    4. Select a device. Devices with multiple models are labeled.
    5. To exclude all models of the device, go to the top right corner of the screen and select Exclude all models.
      • Other models are listed under the first model’s details. To view details for other models, go to the right side of the screen and select the down arrow .
      • To exclude one model of the device, go the bottom right corner of a model’s details and select Exclude.
    Note: To exclude your app from all devices made by one manufacturer, you need to exclude devices one at a time.


    have you tried this? Do Google provide a default list of devices that you can just exclude? or does it say somewhere you have to explicitly provide your own list of devices?
     
  6. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    40
    I'm not interested in Letterboxing. I want to EXLUDE incompatible devices, so my game is not even offered to them.
     
  7. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    40
    This part is not so straightforward in Google. I still hope to hardwire the minimum aspect ratio into the manifest.
     
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,358
    Why?
     
  9. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    40
    My initial plan was to fix aspect ration to 16:9 and use LetterBoxing for any other ratios.

    Then I managed to design my game to fit multiple aspect ratios and avoid Letterboxing.

    I don't know how to do letterboxing ONLY for ratios below 1.5 while having NO letterboxing for ratios above 1.5.
     
  10. Loomabox

    Loomabox

    Joined:
    Nov 4, 2015
    Posts:
    40
    I still don't know if it is ever possible to hardwire the MINIMUM aspect ratio into the manifest.
     
  11. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,358
    You just grab the screen data and apply the aspect ratio on startup.
     
    Antypodish likes this.
  12. HavenbrookStudio

    HavenbrookStudio

    Joined:
    Aug 18, 2019
    Posts:
    7
    It's not possible. Not the way you want to do it. You can only explicitly set the maximum, not the minimum.

    AFAIK, you're going to have to do something like using aspect ratio constraints etc. It might be worth asking on an android-specific dev forum.

    https://developer.android.com/reference/android/support/v7/widget/StaggeredGridLayoutManager
    https://developer.android.com/reference/android/support/constraint/ConstraintLayout