Skip to main content

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

[SOLVED] Unity WebGL game displaying with border and fullscreen not working properly

A topic by Al's Game Shack created Sep 26, 2022 Views: 7,343 Replies: 1
Viewing posts 1 to 2
(1 edit) (+2)

Hi folks,

I've uploaded a HTML5 game which I made in Unity to itch and a couple of problems occur.

First the game in normal mode seems to have this gap along the top and left of the game window. Not sure if this is a common thing but having checked my old Construct 2 games this doesn't seem to happen there although it does on another project I have made in Unity - https://alex-wallace.itch.io/which-way

Second, regarding fullscreen, the window remains the same size when using the itch.io built-in fullscreen option.


It's likely something I'm doing wrong on either itch or in my Unity build but I can't quite figure it out. Please can anyone suggest what the problem might be?

Some additional points on the project:

  • Game is built at 1280x720 resolution
  • Resolution is manually set on itch at 1280x720
  • I have also tried using auto detect on itch for Unity HTML games but I get an error message saying the game can't be displayed
  • Below are the settings for my Unity build for WebGL

Any help would be greatly appreciated! Let me know if I can give any more info.


Thanks

Alex

(+11)

SOLVED

When searching for a solution I was looking for issues with fullscreen and the border but going with the error message about itch's auto detection feature I found the following page - https://github.com/itchio/itch.io/issues/1043

From here there is a fantastic template made by Sean which scales Unity games automatically depending on the window size. Literally a drag and drop template into your Unity project and both the borders are gone as well as the fullscreen is working properly.

(Unity) Better Minimal WebGL Template


So yeah, all sorted XD

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.