Suppose so to facilitate:
if(autorotate){включаем автоповорот, или как-нибудь поставить галочки на Landscape в player settings} else галочки убираем с landscape. I attached the generated ScreenOrient script to MainCamera.
void Update { if( Input.deviceOrientation == DeviceOrientation.FaceUp) { //вот тут хочу сделать только портретную ориентацию //deviceOrientation = Portrait. Но не понимаю как. } } Those. when the phone put the screen up, switched to portrait. The main thing in the script is how forced to turn the screen I need to know. Thank. And I apologize, if it is not clearly explained, did not describe.
