IPad Pro 2018 Unity 屏幕适配 解决无法全屏问题

MTL测试结果说在IPad Pro 2018上出现了没有全屏的问题。由于是在Splash Screen阶段就出现了不全屏的现象,故认为应该这是native阶段的问题。

于是以「ipad pro 2018 unity fullscreen」为关键字进行搜索。查到一可行之方法如下:

  1. 进入ios Player Setting
  2. 找到Splash Screen项
  3. 将其下的IPad的选项改成default

生效的原理不详。改动此选项应该是会改动info.plist里的选项。

这一篇文章中有说到,欲适配IPhoneX有两步要做:

  1. 不使用安全区域
  2. 设置一张对应的闪屏图(必要

由于该文章强调了第二步的重要性,故可推断出错误的(或缺失)闪屏图会导致无法全屏。

参考文献:

Edge-to-Edge on iPad Pro

改法

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 ‾_(ツ)_/‾

原理

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.

Buy Me A Coffee / 捐一杯咖啡的钱
分享这篇文章~
0%
//