Hello,
I want to test Orientation in Unity, so I created simple project, and chose Iphone Wide (480x320)
And I configured with iOS setting as below:
Ok, then I added C# script to MainCamera component with content:
using UnityEngine;
using System.Collections;
public class ScreenSolution : MonoBehaviour {
// Use this for initialization
void Start () {
//Screen.orientation = ScreenOrientation.LandscapeRight;
Debug.Log ("or = " + Screen.orientation);
if (Screen.orientation == ScreenOrientation.Portrait)
Debug.Log ("current orientation = " + Screen.orientation);
else if (Screen.orientation == ScreenOrientation.Landscape)
Debug.Log ("Landscape");
else if (Screen.orientation == ScreenOrientation.Portrait)
Debug.Log ("Portrait");
}
// Update is called once per frame
void Update () {
}
}
But when I run my project, results from console is always Portrait:
or = Portrait
current orientation = Portrait
I configured Resolution is Iphone Wide (480x320) , so I think result should be Landscape, right ?
Please advise me about this .
Thank you very much.