Search Issue Tracker
Fixed in 2022.2.X
Votes
0
Found in
2021.2.0a16
Issue ID
1394769
Regression
Yes
Screen.orientation returns Landscape despite it being made obsolete
Screen.orientation returns Landscape when the orientation is set to Landscape Left. This is incorrect because ScreenOrientation.Landscape was made obsolete.
Steps to reproduce:
1. Open the attached project
2. Build for a mobile device of your choice
3. Attach a tool to verify console output - Screen.orientation reports Landscape.
Note: the attached project already has the Default Orientation set to Landscape Left. Make sure you have the same setting if you are not using the attached project.
Expected result: Screen.orientation is equal to ScreenOrientation.LandscapeLeft.
Actual result: Screen.orientation is equal to ScreenOrientation.Landscape
Reproducible with: 2021.2.0a16 and above
This is an undesirable result because we have made the ScreenOrientation.Landscape obsolete thus it's hard to use the resulting enum value from Screen.orientation in case it is needed.
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (fix version 2022.2):
Fixed Screen.orientation returning deprecated "Landscape" value instead of "LandscapeLeft".