Hi,
I have a game force in portait mode. I use the browser to play video on youtube, before open the browser i switch landscape and I back portrait when I closed the browser
protected IEnumerator PlayBackRoutine()
{
yield return new WaitForSeconds(1);
UICommander.HideAll();
Screen.orientation = ScreenOrientation.Landscape;
while (Screen.currentResolution.height > Screen.currentResolution.width)
{
yield return null;
}
InAppBrowser.DisplayOptions displayOption = new InAppBrowser.DisplayOptions();
displayOption.displayURLAsPageTitle = false;
displayOption.hidesTopBar = true;
InAppBrowser.LoadHTML("<div style='position:absolute;left:0;right:0;top:0px;bottom:0;overflow:auto;'><iframe id=\"ytplayer\" type=\"text/html\" width=\"640\" height=\"360\" src=\"http://www.youtube.com/embed/kQye2uNafk0?autoplay=1&controls=0&rel=0&showinfo=0&cc_load_policy=1&hl=ru&fs=1\" frameborder=\"0\" style=\"margin:0px;padding:0px;\"/></div>", displayOption);
}
protected IEnumerator Close()
{
Screen.orientation = ScreenOrientation.Portrait;
while (Screen.currentResolution.height > Screen.currentResolution.width)
{
yield return null;
}
UICommander.ShowAll();
}
When I am in the browser (only on IOs), the screen orientation is not freeze in landscape. (I didn’t test if after leave browser it’s freeze in portrait or if I didn’t switch to landscape before open the browser it’s do shit too, but I will maybe try in th eweek )
Do you know if it’s a know problem of your asset? 🙂