Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by jongallant · Nov 18, 2014 at 08:58 PM · c#androidscreenorientationautorotate

Auto Rotate Bug in Android

I am setting my default orientation, in my player settings, to "Auto Rotate".

This works fine. The problem is that when you disable the "Auto-Rotate" in the system settings of an android device, the unity player doesn't care, and auto rotates the screen anyways.

This has been tested on 3 different devices, so it is not a single device problem. I have been trying to find a work around for this problem, and have failed to do so up to now.

Can anyone shed some light on this issue? Surely I cannot be the only one that has found this bug? Is there any way to disable the auto-rotate when the device has is explicitly disabled?

Comment
Add comment · Show 10
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image almo · Nov 19, 2014 at 09:17 PM 1
Share

Nobody noticed this? Or nobody has an answer?

avatar image screenname_taken · Nov 19, 2014 at 09:39 PM 0
Share

What version of Unity are you using? Tried a patch?

avatar image jongallant · Nov 19, 2014 at 09:43 PM 0
Share

I'm on 4.5.5f1

avatar image jongallant · Nov 23, 2014 at 01:41 PM 1
Share

@Yury Habets I call it a bug, because it is ignoring the device system settings. If a user is saying "no I don't want my phone to auto rotate", then the application shouldn't be auto rotating.

avatar image almo · Nov 23, 2014 at 02:48 PM 2
Share

I totally consider that a bug. If the user wants no auto-rotate, it shouldn't.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by jongallant · Nov 26, 2014 at 04:09 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Bunny83 · Nov 23, 2014 at 04:42 PM

It's not really a bug. If an application requires landscape and can't run in portrait at all it will rotate to landscape, even when the rotation is locked. There's no way around this since you forced the rotation to the one you specified.

If you turn off auto rotate in the system settings of the device, all you tell the OS is to not rotate automatically when you tilt the device. Applications still can rotate the screen. However when the rotation is locked on the device it only allows necessary rotations (landscape -> portrait or portrait -> landscape).

Try any other android app that requires a certain orientation: For example minion rush or subway surfers which only works in portrait. They always rotate to portrait. What you can influence with auto rotate is if it is allowed to rotate it upside-down. I use my nexus7 upside down most the time. Minion rush of course forces portrait but it also rotates to the "normal" (non upside down) rotation. When you "lock" your rotation upside down it will stay since it's also a portrait rotation. Though the game works, things involving accelerometer input are reversed when playing upside down.

So if you force a certain orientation it will rotate to that rotation at least if it's a different orientation type.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jongallant · Nov 24, 2014 at 11:50 AM 2
Share

Shipping a product with this behavior is going to piss some users off. I don't see this as a feature, it doesn't make sense to me.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Oculus OVR 0 Answers

Why does my app function correctly in Unity Remote but not compiled as an app? 0 Answers

An OS design issue: File types associated with their appropriate programs 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges