Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void SetPortraitMode()
- {
- Debug.Log("SetPortraitMode");
- //Screen.orientation = ScreenOrientation.Portrait;
- if(Screen.autorotateToPortrait != true)
- {
- Screen.autorotateToLandscapeLeft = false;
- Screen.autorotateToLandscapeRight = false;
- Screen.orientation = ScreenOrientation.Portrait;
- Screen.autorotateToPortrait = true;
- Screen.autorotateToPortraitUpsideDown = true;
- Screen.orientation = ScreenOrientation.Portrait;
- //Screen.orientation = ScreenOrientation.AutoRotation;
- }
- }
- private void SetLandscapeMode()
- {
- Debug.Log("SetLandscapeMode");
- //Screen.orientation = ScreenOrientation.Landscape;
- if (Screen.autorotateToLandscapeRight != true)
- {
- Screen.autorotateToPortrait = false;
- Screen.autorotateToPortraitUpsideDown = false;
- Screen.orientation = ScreenOrientation.LandscapeLeft;
- Screen.autorotateToLandscapeRight = true;
- Screen.autorotateToLandscapeLeft = true;
- Screen.orientation = ScreenOrientation.LandscapeLeft;
- //Screen.orientation = ScreenOrientation.AutoRotation;
- //DeviceOrientation = DeviceOrientation.LandscapeLeft
- }
- //Screen.orientation = ScreenOrientation.AutoRotation;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement