Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.