Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Getting errors with ScreenOrientation.Portrait

$
0
0
I'm trying to set the screen orientation to portrait for my mobile game and am getting the below error.

error CS0117: `ScreenOrientation' does not contain a definition for `Portrait'

I'm using
Code (CSharp):
  1. Screen.orientation = ScreenOrientation.Portrait;
to set the orientation to portrait but its not working.

Can anyone tell me what I'm doing wrong? Or how do I prevent the auto-rotation? Its a vertical shooter and I want it to stay in portrait.

Thanks

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>