Search Issue Tracker

Active

Votes

193

Found in

5.4.0f3

Issue ID

835745

Regression

No

[iOS] Changing the screen orientation via a script sometimes results in corrupted view on iOS 10

iOS

-

-

Priority: 3Not yet prioritized for a release

-

Severity: 2No workaround

When the orientation of the screen is changed 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.

Steps to reproduce:
1) Open the attached project.
2) Build 'MainScene' for iOS.
3) Run on an iOS 10 device.
4) Press the 'Switch to landscape' UI button.

If the button is clicked 2-3 seconds after launch - the rotation should fail - black area appears at the bottom of the screen, half of the game view is not visible. If it does not, quit the app completely, re-launch it and repeat step 5). This occurs with both Metal and OpenGLES on iOS 10.

Reproduced on:
5.5.0b5, 5.4.1p3, 5.3.6p6

Devices:
iPhone 7 iOS 10 - reproduced
iPhone 7 iOS 10.1 - reproduced
iPhone 7 Plus iOS 10.0.2 - reproduced
iPhone 5 iOS 10 - not reproduced
iPad Mini 2 iOS 10 - not reproduced
iPhone 5S iOS 9.2.1 - not reproduced
It should also be reproducible on iPhone 6.

Comments (71)

  1. E727b02660bbcbac4978af67dba0967a?d=mm

    TNTdev

    Dec 29, 2016 10:14

    Any news on this.I'm also having this trouble. my unity version 5.4.2f2 .Please tell me if you got any work arounds for this matter.

  2. 85916f2e42ab5a983e1943f37437c764?d=mm

    DarkMagicCK

    Dec 23, 2016 06:56

    Great, Unity. Thanks for this bug, and Apple rejected our app because of this issue.

    Our game only supports landscape left and right, but apple successfully launched our game in portrait mode and saying our game is crashed.
    And they went into Christmas Holiday, so we can only submit new version after this week, and our game missed the Christmas Campain content for our gamers. What a nice Christmas.

    And maybe Unity you also enjoys this Christmas.

    But we do not, and we're facing a frustrating week. Thanks, Unity.

  3. A6de77c150807dc1bc1b8053a4247f8a?d=mm

    andyvene

    Dec 21, 2016 19:19

    Unity must fix this issue, yesterday.
    Apple Store normally rejects apps having issues on this level , wake up the devices on that certain application and crashes.

  4. B2b260867dfbd83bc4d661d4603aef11?d=mm

    bitdelve

    Dec 21, 2016 14:26

    Just FYI, it isn't 9 votes left. That 9 Votes left in the top right corner means something else. It said that back when there were only 48 votes on this.

    Also, I have tried both workarounds described in the comments with no luck. Please, Unity team, get this fixed. This is literally keeping us from updating our iOS app.

  5. 13db2970a528603271106a85e6e5a55f?d=mm

    ptblk

    Dec 20, 2016 04:50

    9 votes left, please vote guys otherwise this will never get fixed

  6. 1ae1699ae39695d58ab96673619f0af8?d=mm

    voporak5

    Dec 18, 2016 06:16

    Unity, please increase the severity of this issue. The "workarounds" may not be the most user friendly or best fit into the game design.

  7. 295ca23f4db522bb1c3ec70ea042c0dc?d=mm

    helios

    Dec 17, 2016 23:01

    This is an absolutely abysmal bug - This is not fixed even in 5.5p1. The game crashes when unlocking your phone if you've gone into portrait mode. Iphone 6 with iOS 10 here. Run game which is landscape. Lock phone. Turn phone into portrait while locked. Unlock the phone and the game crashes. It doesn't crash if you keep your phone in landscape and unlock that way.

  8. 4b38dae05c4e294ee8362ec988231815?d=mm

    matbou

    Dec 14, 2016 22:52

    I have noticed that the severity of this issue is 3, meaning "workaround is possible", which absolutely not the case.
    So please increase the severity of this issue, and fix it asap. It is really a terrible bug!

  9. 791c3824aa0b2c240b3e20b0c7bdaad3?d=mm

    Ethan_VisualVocal

    Dec 13, 2016 21:34

    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: https://gist.github.com/Ethan-VisualVocal/286ebae00eb3100885b19c90e8b9ff52

    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.

  10. 85916f2e42ab5a983e1943f37437c764?d=mm

    DarkMagicCK

    Dec 12, 2016 13:31

    Though, this causes wired auto rotation for our users when they bring our game front Background to Front, That's wired, and I dont know if Apple will reject our app because it behaves strange, just like a bug.

    Hope this bug would be fixed soon.

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.