Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

Works great !
Though for some reason, when enabling Itch.io's fullscreen on firefox, the game remains scaled down until you click it again. (No issue on chrome)

Another thing that is not an issue but worth noting:
Whereas Itch.io can usually find the canvas' size for Unity games automatically, this template requires setting the canvas size manually.

(1 edit) (+1)

Hey, thanks for the feedback! I'll try to take some time to look into those issues.

Edit: looks like the first issue is on Unity's end (the canvas does in fact resize, but Unity's not updating till it's been focused). RE the auto-detect size, I spent a bit of time tinkering to see if I could figure out where they're pulling the size from without success; I've submitted a feature request on itch.io's github about it though, and will update this if more info on the auto-detect becomes available.

(2 edits) (+3)

Late reply, but I just came across this template and ran into the same issue as you with itch not being able to detect the canvas size.

But the good news is I found the solution.

Near the bottom of the index.html included in the template, change the line with

<div id="gameContainer">

to

<div id="gameContainer" style="width: %UNITY_WIDTH%px; height: %UNITY_HEIGHT%px"></div>

and itch.io will then be able to automatically find the canvas size.

(+2)

Thanks for figuring this out! I've updated the template with the suggested change now.