I am working on a unity UI project. I had multiple scenes. my scenes are on portrait mode except the last scene. last scene is landscape mode. for the last scene at start method I set Screen Orientation to LandscapeLeft and set the canvas scaler referance resolution 800*600. I work with 480*800 screen and screen match mode is "match width or height" and match is width so the canvas SHOULD scale up to 800*480 on landscape mode. because of the width must match the height is gonna be the max value for screen
but when I run unity the screen doesnt change to landscape for last scene and the canvas sizes are 800*1333 when I select the landscape resolution 800*480 the canvas sizes change to 800*480 but since the script cant wait for me to select the resolution my script thinks the canvas sizes are 800*480
void Start()
{
Screen.orientation = ScreenOrientation.LandscapeLeft;
Debug.Log(Screen.width+" - "+Screen.height);//output: 480-800
Debug.Log(canvas.GetComponent<RectTransform>().rect.width + " - " + canvas.GetComponent<RectTransform>().rect.height);//output: 800-1333
}
I set to landscape at start but game comes like this I expected to change to this:
am I doing wrong when I try to change the orientation ? why doesnt the game panel change to landscape How can I get the landscape canvas sizes?