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.
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
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
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.