Start on full screen on mobile browser?

Hello! so after a long time and hard! i uploaded a game and everything’s great! good for me! but at first, when i had it hosted on itch.io when i opened in from a mobile browser it always opened in landscape mode fullscreen but now it doesn’t! does anyone know of a way to make it so? like identify the os and act accordingly? thank you!

I believe the behavior on itch.io that automatically turns the game to run in landscape is a feature that itch.io has themselves developed. Current Unity builds do not have orientation locking in place. (we do not currently support that C# API on mobile, but that is on the todo list)

Try to ask around at Itch.io forums, or check if there is some kind of option in Itch.io project publishing settings that controls this?

so nothing? even if i write in in the css on the index.html?at least to be able to set it to full screen just on android?

Sorry, I do not quite parse the followup question properly?

E.g. testing out test3 by rexact, it does work in fullscreen landscape for me. That is an “out of the box” Unity export with no modifications to index.html or style.css files.

You can’t actually start on fullscreen. You need a user gesture for the browser to request fullscreen. I made a free plugin to make this easy, if you need your app to react to fullscreen changes.

1 Like

I believe Itch.io does do the fullscreen request when one clicks on Run Game. That is where it also applies the landscape orientation lock for the page.