Search Issue Tracker
Fixed
Fixed in 2020.3.X
Votes
1
Found in
2019.4
2020.3
2020.3.17f1
2021.2
2022.1
Issue ID
1378593
Regression
No
[iOS 15] Screen.safeArea.width returns incorrect value when device's orientation is switched to landscape mode
Reproduction steps:
1. Open the attached project "safeArea.zip"
2. Build and Deploy the project on a device
3. Hold the device in Portrait mode and rotate it to switch to landscape mode
4. Observe the values displayed in the Build
Expected result: The first value in the line "Safe" is smaller than the first value in the line "Real"
Actual result: The first value in the line "Safe" is equal to the first value in the line "Real"
Reproducible with: 2019.4.32f1, 2020.3.22f1, 2021.2.2f1, 2022.1.0a13
Reproduced on:
- iPhone 13 (iOS 15.0)
Does not reproduce on:
- iPhone 12 mini (iOS 14.1)
- iPhone 6 (iOS 12.4.8, safe area is supposed to be equal to actual)
- iPhone 7 (iOS 12.3.1, safe area is supposed to be equal to actual)
-
tessellation
Jan 06, 2022 06:03
For other developers that can't wait for a backport of this fix to Unity 2020, you can install the latest Unity 2022.1.0 beta and then copy the following files back to Unity 2020 from the PlaybackEngines/iOSSupport/Trampoline/Classes folder:
UI/SplashScreen.mm
UI/UnityAppController+ViewHandling.mm
UI/UnityView.mm
UI/UnityViewControllerBase.*
UI/UnityViewControllerBase+iOS.*
DeviceSettings.mm
DisplayManager.mm -
MartinG
Jan 03, 2022 10:57
A fix in LTS Versions would be great! We still have apps on Unity 2018.4.34.
The bug occurs, if apps are built with XCode 13.x and then only occur on iOS15.x devices. iOS 14.x works.
If the apps are built with older XCode, for example XCode 12.5.1, then the safeArea works on iOS 14 and iOS 15 devices.
-
RyannKim
Dec 23, 2021 21:33
Same problem here!
-
tessellation
Dec 16, 2021 20:26
Please back-port to 2020.3 LTS, ASAP. We were hoping this would be in 2020.3.25f1, but alas it was not fixed. Apple released iOS 15 on September 20th, so we've had to put up with this bug for almost 3 months now. If you have a work-around, please post code. Thanks!
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Wrong NativeName displayed when returning System.Globalization.CultureInfo("zh-TW").NativeName
- UI Toolkit ScrollView.verticalPageSize doesn't change the scrolling amount when using keyboard arrows
- Box selection in Scene View doesn't select 3D objects when GPU Resident Drawer setting is set to Instanced Drawing
- Debugger stops at commented lines of code when using ECS
- Asset preview doesn't update on changing shader's _GlobalColor property when the shader uses global uniforms
Resolution Note:
Fixed in 2022.1.0a14
Resolution Note (fix version 2020.3):
Fixed in 2020.3.32f1