Search Issue Tracker




Found in


Issue ID




"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)

  1. C26e850a83c5ec28aeeae825dff63b3a?d=mm


    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 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:
    We will work hard to fix this.

  2. 2fc62a08d9e156ff11be1046b37e1558?d=mm


    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.

  3. 831eacc6c6ad453d44888fe83bd094f3?d=mm


    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.

Add comment

Log in to post comment

All about bugs

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