5
\$\begingroup\$

I am currently looking for a workaround, or fix, for a Unity bug.

I want to be able to auto-rotate my game, while respecting the Android system settings.

Currently, if you set your Unity Orientation Mode to "Auto Rotation", your application will automatically change its orientation based on the physical's device orientation. In iOS, if you disable the Screen Rotation in device settings, the auto rotation stops as intended. In Android, even if you lock your screen orientation, the application will continue to auto rotate. This is a major bug.

Does anyone know of a workaround, so that my android application will be able to auto-rotate, while still respecting the device system settings?

You can easily reproduce this bug by creating a blank project, setting the orientation mode to "auto rotation" and running it on an android device.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

This is a major bug in Unity. For those who are stumbling here trying to find a solution, a very awesome gentlemen posted a fix over here at github

https://github.com/hvs-clark/unity-android-rotation-lock

Hopefully Unity fixes this crazy bug soon, so we don't have to use workarounds like this in the future. From what I read, it is by design, which in my opinion is horrible design. https://github.com/hvs-clark/unity-android-rotation-lock

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .