Search Unity

Edge-to-Edge on iPad Pro

Discussion in 'iOS and tvOS' started by MattWhiting, Nov 14, 2018.

  1. MattWhiting

    MattWhiting

    Joined:
    Jan 11, 2016
    Posts:
    51
    Our game is out and runs well on various iOS devices. However, on the new iPad Pro, the display does not go all the way to the edge of the device. There are black borders on the sides. How do I fix that?

    (Yes the game does fill the screen on all other devices. It is a 2D game with a background image on the Canvas that is tiled from 0, 0 to 1, 1. It should fill the entire screen regardless of screen resolution or aspect ratio.)
     
    fuku-sin likes this.
  2. fuku-sin

    fuku-sin

    Joined:
    Oct 17, 2018
    Posts:
    2
    I have the same problem. Does anyone have a solution?
     
  3. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    10
    Hi,
    I have the same problem. The App is scaled down on new iPad Pro 11", we have borders on the side and on top/bottom (in landscape).
    It seems the app trys to fit the old native ipad 10.5" resolution. o_O

    I updated xcode to 10.1 and use iOS 12.1 as target.
    Force to fullscreen does not work either.

    Unity Version: 2018.2.12f1
     
    Last edited: Nov 22, 2018
  4. torahhorse

    torahhorse

    Joined:
    May 14, 2013
    Posts:
    7
    Hey Matt!! I'm encountering the same thing. I built the app with 2017.4.4f1 & XCode 10.1. I'm gonna try building with 2017.4.15f1 and see if I get different results. Also let us know if you found a solution!
     
  5. MattWhiting

    MattWhiting

    Joined:
    Jan 11, 2016
    Posts:
    51
    I have the solution.
    All you've got to do is upgrade your XCode. You may need to upgrade your OS first to do that. I'm on Mojave with XCode 10.1 with Unity2018.1.9f1
     
    Last edited: Nov 24, 2018
  6. torahhorse

    torahhorse

    Joined:
    May 14, 2013
    Posts:
    7
    I upgraded my XCode to 10.1 and still had the same behavior, but when I built an empty project it didn't have the problem-- so I went through every setting and it turned out to be caused by my Launch Screen settings in PlayerSettings. I had mine set to "None". When I switched to "Default" my build fills the screen properly ‾\_(ツ)_/‾
     
  7. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    561
    Ah, very good hint! We actually created different screens (for iPhone, iPhoneX and iPad) so we can do a seamless transition. The trick to keep that behavior is to just change iPad Launch Screen to Default and set the Mobile Splash Screen image to your iPad image. This way all iPhones access your custom images, while all iPads use the Mobile Splash Screen image. Works great for our needs and the iPad Pro 12.9'' looks good in the simulator now.
     
    Vortexboy likes this.
  8. kiles

    kiles

    Joined:
    Apr 2, 2011
    Posts:
    9
    Thanks! you made my day.
     
  9. leoNERDo

    leoNERDo

    Joined:
    Feb 2, 2013
    Posts:
    10
    This fixed it for me too! Good work :D
     
  10. exkulo

    exkulo

    Joined:
    May 13, 2019
    Posts:
    3
    Thanks a lot!! It perfectly worked! I set it "default" for IPad and "Image and background (relative size)" for IPhone (to adapt IPhoneX).
     
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,618
    I'm confused, I have both set to Image and background (relative size), does that mean it won't work properly on an iPad Pro?
     
  12. exkulo

    exkulo

    Joined:
    May 13, 2019
    Posts:
    3
    I set it both 'Image and background (relative size)' before, and set 'default' only for IPad just now...It seems like if you want to make it fullsceen, you should set it default for IPad.
     
  13. exkulo

    exkulo

    Joined:
    May 13, 2019
    Posts:
    3
    However I don't know how it works. Could you please explain to me what options it changed?
     
  14. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    64
    iOS determines App's resolution by looking for launch image with matching screen dimensions in the app asset catalog (*.xassets). If the matching one is not found, it will try to find launch images used by older generation devices for backward compatibility. The app will launch in resolution of whatever launch image is eventually found.

    When launch screen options are set to default, Unity generates blank launch image for every screen dimension variant and add them to the asset catalog. The same effect can be achieved with a Storyboard file.
     
    exkulo likes this.