Notch avoidance for iOS

Hi Unity Community!

I already found codes and examples about Screen.safeArea, then I realized Unity manages the notch avoidance with a built-in solution for Android:
In the Player Settings - Resolution and Presentation, there’s a checkbox called “Render outside safe area”.
If that is disabled, then it won’t render anything on the notch areas, and it works perfectly.

Althought I can’t find any similar setting for iOS. First I thought maybe it’s in the iOS guidelines to not avoid notches, then I checked this, so it seems it is advised to avoid notch area:

Isn’t Unity support notch avoidance for IOS yet? Or is there a setting like that one for Android, and I’m just missing that?

3 Likes

I would guess that the difference is due to the operating systems: Android provides a way to configure this for the whole app, while iOS only provides UI elements that developers need to integrate themselves. Unity exposes Android’s option, since that’s straightforward to do, but didn’t want to implement the option themselves for the iOS side.

The option for Android was added in Unity 2018.3, so I wouldn’t hold my breath for a similar iOS option. You need to use Screen.safeArea and implement it yourself.

3 Likes