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.
  2. Dismiss Notice

Universal App

Discussion in 'iOS and tvOS' started by Arashikage, Nov 13, 2014.

  1. Arashikage

    Arashikage

    Joined:
    Dec 8, 2013
    Posts:
    14
    So far I've just been making Android games. Now I want to try building for iOS, but the different aspect ratios are making a mess of things. The Android builds have been at a 16:9 ratio, which is fine for iPhone 5, but how do I get everything to look right at other ratios? Is there a reasonably simple way? The UI elements seem to be fine, but the camera crops the gameplay elements in unfortunate ways.
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    It depends on the type of game, but a typical method is to design everything important for 4:3, where anything extra on the sides in wider aspect ratios is just "fluff", and anchor GUI elements to corners of the screen.

    --Eric
     
  3. Arashikage

    Arashikage

    Joined:
    Dec 8, 2013
    Posts:
    14
    Makes sense. Since I started with 16:9, 4:3 was the worst offender.
    Thanks @Eric5h5 , I'll give it a try.

    Edit:
    Just to clarify, I have to set things up so it works at 4:3, but I build at 16:9, right? Would that build be considered universal (just cropping the sides for different devices)?
     
    Last edited: Nov 13, 2014
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,398
    No, you use a 4:3 game view in the editor (plus switch to other aspect ratios occasionally for testing to make sure you didn't hard-code something), and then you just build. You don't build for any particular screen; the game runs on whatever aspect ratio the device has.

    --Eric
     
  5. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    BTW how did you manage it with Android cause there is a lot more aspect ratio combinations than with iOS devices? if you used 16:9 for all then it already went wrong there