Search Issue Tracker
Fixed
Fixed in 2021.3.28f1, 2022.3.4f1, 2023.1.2f1, 2023.2.0a19
Votes
12
Found in
2021.3.15f1
2022.3.0f1
2023.1.0a25
2023.2.0a14
Issue ID
UUM-23251
Regression
No
[iOS] Screen.orientation returns wrong values when switching from Landscape orientation to AutoRotation at runtime on iOS 16
Steps to reproduce:
# Open attached project (ScreenOrientationTest.zip)
# Switch target platform to iOS and make a build
# Open Xcode project and build to an iPhone
# Click "Landscape Left" or "Landscape Right" buttons to switch to one of these orientations
# Click "AutoRotation" and select all 4 allowed orientations
# Notice that orientation is immediately returned as "PortraitUpsideDown" while device is actually in portrait (not 100% of the time)
# Try rotating the device
Expected result: Orientations are reported correctly as you rotate the device.
Actual result: Orientations are flipped:
- when in Portrait orientation, app reports PortraitUpsideDown
- when in Landscape Left, app reports LandscapeRight
- when in Landscape Right, app reports Landscape or LandscapeLeft
Note: This doesn't reproduce if you switch to AutoRotation from a forced Portrait orientation.
Reproduced with: 2021.3.15f1, 2022.2.2f1, 2023.1.0a25
Devices tested:
iPhone 14 Pro Max, iOS 16.0 - Reproducible
iPhone 12 Pro, iOS 16.2 - Reproducible
iPhone 12 Pro, iOS 15.0 - Not reproducible
iPhone X, iOS 14.4.1 - Not reproducible
iPad Air 2, iOS 14.4.2 - Not reproducible
iPad Air 2, iOS 15.4.1 - Not reproducible
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
YousafGrewal
Jan 09, 2024 11:05
Still facing this issue in january 2024
cat_woods
Aug 25, 2023 09:31
NOT FIXED!!! Enabling auto-rotation after entering the game, killing the process, and immediately entering the game again. Unity version 2021.3.28f1. iPhone 11 iOS 16.6
JoJoJoX
Jul 28, 2023 02:57
Any body reproduces the bug in the releases that declaring bug-fixed?
takatori_unity
May 08, 2023 08:33
I encountered the same issue with Unity 2020.3.37f1. The problem has been reported on iPhone 13 devices. In my case, even though I've only allowed Portrait orientation, the screen can still be rotated to Landscape.
Pavel_989
Apr 13, 2023 08:56
We have an issue with IOS 16. On a quick restart, the app may start in a different orientation than the setting in the project.
nhannguyen2gl
Mar 16, 2023 09:05
Same issue on Unity 2021.1.15 to 2021.1.21
My app is in LandscapeRight but the ScreenOrientation is Landscape?! (not in ScreenOrientation enum)
And when it's portrait, the value is PortraitUpsideDown
kyubuns
Mar 10, 2023 02:48
I am suffering from a problem in iOS16 where games can be run in Orientation that I have not authorized. (Occurs occasionally.)
Could this bug be the cause?