Orientation Auto Rotation rotating screen crash (14 of Unity3D development), orientationunity3d

Source: Internet
Author: User

Orientation Auto Rotation rotating screen crash (14 of Unity3D development), orientationunity3d

Monkey original, reprinted. Reprinted Please note: Reprinted from the Cocos2Der-CSDN, thank you!

Address: http://blog.csdn.net/cocos2der/article/details/44133127

When we run a scenario today, the welcome scenario can be rotated. When we enter the main scenario, we find that as long as the mobile phone screen is rotated, crash will occur.

* ** Terminating app due to uncaught exception 'nsinternalinconsistencyexception', reason: 'unitydefaviewviewcontroller shocould be used only if unity is set to autorotate'

The error message is displayed due to auto rotation.

In Unity Build setting, there is already Auto Rotation. why can't the main scenario be rotated?

In addition, the error indicates that I am calling autorotate, but the mode I set is not autorotate.

Finally, the global search is performed, and the test code manually sets the screen direction to Left. After the problem is changed to automatic, the problem is resolved.

Screen. orientation = ScreenOrientation. AutoRotation;

Although the problem was a small problem, I remembered who ran online the game the day before yesterday because the test code was developed and written to the production environment. As a result, the player added a treasure chest containing many items.

So, who should say, "This is the first thing to do. I will modify it when it is officially configured. ", I promise not to throw you...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.