More details:
The app I’m building is for Portrait mode only. But I’m wondering if one can still detect screen rotations?
More details:
The app I’m building is for Portrait mode only. But I’m wondering if one can still detect screen rotations?
function Awake() {
DontDestroyOnLoad(this);
}
function Start() {
iPhoneKeyboard.autorotateToPortrait = true;
iPhoneKeyboard.autorotateToPortraitUpsideDown = true;
iPhoneKeyboard.autorotateToLandscapeRight = false;
iPhoneKeyboard.autorotateToLandscapeLeft = false;
}
function Update() {
if (Input.deviceOrientation == DeviceOrientation.Portrait)
iPhoneSettings.screenOrientation = iPhoneScreenOrientation.Portrait;
if (Input.deviceOrientation == DeviceOrientation.PortraitUpsideDown)
iPhoneSettings.screenOrientation = iPhoneScreenOrientation.PortraitUpsideDown;
}
Here is (roughly) what you're getting at.