Unity Issue Tracker - Screen.safeArea isn't right for devices with Dynamic Island when in Portrait orientation
Closed
UUM-56433
Screen.safeArea isn't right for devices with Dynamic Island when in Portrait orientation
Unity: iOS
iOS
As Designed
2023.3.X
2022.3.X
IMGUI coordinate system is top-left, screen coordinate system is bottom-left, which caused the confusion. SafeArea is indeed correctly calculated.
Steps to reproduce:
Open attached project (test-cutouts.zip)
Switch to iOS and make a build
Deploy to a device with Dynamic Island (iPhone 14 Pro/ProMax or any iPhone 15 device, simulators work too)
Make sure the device is in Portrait orientation
Expected result: Screen.safeArea should return the safe area of the device, grey rectangle is drawn on screen to show the safeArea on device. Rectangle shouldn't overlap with the notch/dynamic island.
Actual result: safeArea slightly overlaps with the notch/dynamic island.
Note: landscape orientation seems to work fine and the safeArea rect is drawn correctly without overlapping.
Reproduced with: 2022.3.11f1, 2023.3.0a14
Tested with:
iPhone 15 Pro, iOS 17.0.2 - Reproduced
iPhone 14 Pro, iOS 16 - Reproduced
iPhone 13 Pro Max - Not reproduced
iPhone 12 Pro - Not reproduced
Prioritise and Follow this issue
Have a workaround or additional info about this issue?