Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How to utilize itch's full screen button

A topic by Tyler Win created 33 days ago Views: 155 Replies: 1
Viewing posts 1 to 2

Hi, I've made a game in Unity version 6.2. I want this game to have unity's minimal webGL template so that when I embed the game in the browser I can use Itch's full screen button to actually make the game full screen. The issue I consistently come across is that when pressing Itch's full-screen button, the canvas size of the game remains the same and doesn't change. This is not true though for Unity's full-screen button when made with the default webGL template. I know this can be accomplished because I see other games have it but I'm just lost as this point. Any help is appreciated.

(1 edit)

Update: I did find a way to figure it out. After building your project, you want to open the index.html file that was produced. This file contains set canvas values at whatever you set as your default in the resolution and presentation, along with other fixed values. You have to change these fixed dimensions so that the canvas will automatically stretch to fill when called for.  In retrospect, this makes a lot of sense, but it took a while to really figure it out.