Search Issue Tracker
Fixed
Votes
1
Found in
4.5.3f3
Issue ID
649074
Regression
No
"Rotation Lock" feature does not lock all orientations on Unity apps
Recent versions of Android support a "Rotation Lock" feature, generally accessible from the quick-settings areas pulled down from the status bar. However, when rotation is locked one can still change an orientation to all other ones(allowed by app) except the opposite one.
Expectation when Rotation Lock is engaged that the device will ignore rotations and stay in the orientation in which the lock was engaged.
Resolution: This works as intended. Orientation lock is completely handled by the Android OS and beyond the control of the Unity application.
Comments (3)
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
victorluishongchau
Oct 19, 2017 02:11
To MDROTAR and KROMENAKNOV - Editing the manifest does not work because Unity calls setrequestedorientation in code which overrides the manifest value when in autoRotate mode. A good discussion of this issue is at https://forum.unity.com/threads/android-screen-orientation-issues.250855/. What needs to be done is for the screen rotation logic of Unity to better adapt to user rotation lock settings.
To everyone - This issue is reopened here: https://issuetracker.unity3d.com/issues/android-screenorientation-dot-autorotation-does-not-respect-rotation-locking-on-android
We will work hard to fix this.
kromenak
Nov 25, 2014 21:38
The resolution for this is kind of surprising, and doesn't seem to be correct.
On iOS, the orientation lock IS 100% controlled by the OS - even if your game supports rotating to any orientation, the game won't rotate when the OS-level "Lock Rotation" option is turned on.
On Android, the OS-level orientation lock is ignored by Unity. If you lock the rotation in Android, but your game supports rotating to any orientation, your game will still rotate to any orientation.
That being said, not fixing this issue makes some sense, since the manifest values that would fix this issue have API compatibility of 18 and higher, whereas I think Unity needs to maintain compatibility with API level 9.
mdrotar
Nov 25, 2014 16:31
This could be fixed by allowing the developer to change a setting that would affect the android:screenOrientation attribute of the Activity.
sensor* options ignore the user's orientation lock setting.
user* options are the same as sensor* but honour the orientation lock system setting.
Add a checkbox to "Ignore user orientation lock setting". If checked, it would behave as it does now. If unchecked, it would use the user* version of the current sensor* settings.