Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Support for Fullscreen Mode in Web Games on iPhone

A topic by colus23 created Oct 05, 2023 Views: 536
Viewing posts 1 to 1
(+1)

I understand that Unity does not provide fullscreen support on iPhone.

However, surprisingly, you can achieve a fullscreen-like effect with a simple solution. You can set the min-height: calc(100vh + 100px); and overflow: auto; styles to the window's body, creating a scrollable state.

When the window is in a scrollable state, iOS automatically hides the address input bar, creating a fullscreen-like experience. The window becomes larger than the actual game, but the game still displays at its original size on top of the window and remains fixed, so it doesn't scroll. This provides a fullscreen-like effect.

However, when distributing your game on itch.io within an iframe, this approach may not work. I hope that itch.io can implement a similar solution within its iframe to enable a fullscreen-like experience on iPhones.