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 Tony Povey · Jun 02, 2015 at 10:40 AM · screenadsorientationportraitincorrect

Incorrect portrait Screen.orientation after Unity Ad interstitial playback

My iOS game supports autorotation in portrait and portrait upside down formats only. If I output the value of Screen.orientation with the phone upright and upside down I get Portrait and PortraitUpsideDown values as you would expect.

My problem occurs after playing a Unity Ad interstitial video, this has been tested on an iPhone 5S. While the video is playing I rotate the iPhone to landscape orientation and then skip the video, then close the static ad end screen to return to the game. On returning to the game it is still in Portrait orientation as you would expect. The issue is that the Screen.orientation value is now inverted, when the phone is upright the value is PortraitUpsideDown and when upside down it is Portrait. This remains the case when you rotate the device back and forth, it continues to be the opposite of what you'd expect.

For most people I can see that this would not cause a problem, however, I make use of Input.acceleration in conjunction with compensateSensors. I find that the axis are reversed with +X to the left rather than right. So the compensation is relying on the now incorrect Screen.orientation. I cannot turn off compensateSensors and correct it myself as I would also be reliant on this incorrect Screen.orientation value. Note that Input.deviceOrientation is correct in all cases, however, this is not guaranteed to match the actual screen orientation so is of limited use.

Has anyone experienced these same issues or found a work around? I'm guessing this is a bug.

Unity version 5.0.2f1, Unity Ads version 1.1.4

Comment
Add comment
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

0 Replies

· Add your reply
  • Sort: 

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

2 People are following this question.

avatar image avatar image

Related Questions

Screen orientation change in scenes (unwanted effect) 1 Answer

Difference between Screen.orientation - Input.deviceOrientation 2 Answers

Is is possible for Unity 3D smartphone app to support multiple orientations 1 Answer

Android Splash Screen starting in Portrait mode 1 Answer

iOS8 Screen Orientation Change 0 Answers


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