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...