rendered paste bodyusing UnityEngine;
using System.Collections;
public class DeviceOrientationHandler : MonoBehaviour {
private iPhoneScreenOrientation currentOrientation;
void Update () {
//Debug.Log("(iPhoneScreenOrientation)iPhoneInput.orientation:"+((iPhoneScreenOrientation)iPhoneInput.orientation)+",iPhoneInput.orientation:"+iPhoneInput.orientation);
currentOrientation= (iPhoneScreenOrientation)iPhoneInput.orientation;
if(currentOrientation== iPhoneScreenOrientation.LandscapeLeft || currentOrientation== iPhoneScreenOrientation.LandscapeRight){
iPhoneSettings.screenOrientation = currentOrientation;
}
}
}