Unity Game has wrong resolution on Macbook pro 2021

Hi,

Making a game on Unity, we saw that the resolution returned by the functions like Screen.currentResolution or Display.main.systemWidth and Display.main.systemHeight don't set the proper one on Macbook pro M1 2021.

https://support.apple.com/kb/SP854?viewlocale=en_US&locale=ja_JP

In fact, after a dynamic set with those, my screen keeps a 16:9 resolution and black bars are visible on left and right side.

Did you encounter this issue ?

This is the answer.

The problem was that the resolution I got included the notch of the new macbook pro. I created a plugin to recover the safe area and the margin on all direction. The result is better but not perfect. We have still black bars on sides but a lot thinner than before. Apparently the safeAreaInsets are not that accurate that they should or an external problem avoid me to be.

https://developer.apple.com/documentation/appkit/nsscreen/3882821-safeareainsets?language=objc https://developer.apple.com/documentation/appkit/nsscreen/1388369-visibleframe?language=objc

Unity Game has wrong resolution on Macbook pro 2021
 
 
Q