- Home /
Question by
apapineni · Oct 30, 2017 at 10:39 PM ·
androidunity 5screen orientation
How to rotate screen instantly on android?
I have code to rotate the screen for my game when it should change to a different screen
screen1.SetActive(false);
Screen.orientation = ScreenOrientation.Landscape;
Screen.SetResolution(1920, 1080, false);
screen2.SetActive(true);
The problem seems to be that when this happens, screen1 gets squished to the wrong resolution for a second before screen2 appears. It looks really ugly and unpolished. Is there a way to avoid this behavior or make the rotation instant? I've tried using WaitForEndOfFrame but it doesn't seem to work.
Comment