[Bug] [iOS 10] Screen.orientation sometimes results in corrupted view

When the orientation of the screen is changed (from ScreenOrientation.Portrait to ScreenOrientation.Landscape) via a script (with Screen.orientation) on iOS 10 devices, sometimes the screen remains in portrait orientation, but the game view gets flipped and goes over the edge of the screen and leaves black area in the bottom part of the screen.

sometime error:


sometimes right:

ISSUE TRACKER: Unity Issue Tracker - [iOS] Changing the screen orientation via a script sometimes results in corrupted view on iOS 10

Anybody has solution to quick fix in iOS code? Please help me, thank you!!!

1 Like

(Reposting my comment here.)

None of the posted workarounds works for our situation, but we came up with one that does!

Here’s a link to the basics of our current workaround: Workaround for Unity set Screen.orientation bug on iOS 10. · GitHub

Context: Our app starts in Portrait, has autorotate disabled, and we explicitly force LandscapeLeft upon loading a “level” – this step of explicitly changing from Portrait to LandscapeLeft causes the bug to appear almost 50% of the time on iOS 10.

Thank you
I will have a try

There is already a bug report on this issue. You can track the progress here:

I am still getting this in Unity 2020.2.1f1. I can’t vote for the issues as it is marked as resolved.

This is more of an iOS issues as far as I can tell, because this issue also used to happened to non-Unity apps that has a storyboard as the launch display. The issue went away in later iOS versions, although no release notes from Apple acknowledged the issue or mentioned that the issue was fixed.

+1, this feature doen’t work in 2020