There are 3 types of orientation in Rotate only landscape public void AutoOrientToLandScape() { if(Vector3.Dot(Input.acceleration.normalized,new Vector3(1,0,0)) > 0.45) { Screen.orientation=ScreenOrientation.LandscapeRight; } else if(Vector3.Dot(Input.acceleration.normalized,new Vector3(-1,0,0)) > 0.45) { Screen.orientation=ScreenOrientation.LandscapeLeft; } } Rotate only Portrait public...
Screen Orientations Methods in unity3d
S