Where are Screen.safeArea's defined?

Hi all,

I’m using Screen.safeArea to adjust the UI in my game so that it fits nicely within the screen on any device (including iPhone X with its notch and curved corners).

What I’m wondering is where the safeArea of a device is defined? Is Unity looking it up on each device, or is it hard coded in Unity for a number of devices?

The reason I ask is that I want to make sure that my code will work with all future devices.

Thanks!

It’s not hardcoded. iOS and Android P (I think?) have APIs that return the device’s safe areas. Unity uses those APIs.

Excellent. Thanks for your help!