Skip to main content

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

Unity WebGL Game won't fully load

A topic by PbnjGuy created Aug 06, 2020 Views: 18,194 Replies: 12
Viewing posts 1 to 4
(1 edit) (+4)

I have a fairly small game called Nothing Truly Changes running with Unity WebGl, and when I load it, the progress bar goes to 9/10 and never loads. Is it just taking a long time, or will it never load? (The .zip folder has the index, the Build, and the TemplateData.)


(+2)

I'm having the same problem. The only workaround I've managed to find is to make a "development build" and upload that one.

(+1)

what do you mean by "development build"? like in build settings in unity or something in itch.io (this is my first game so i really want it to work)


This is what I've done to get my game to work. Note this is not a fix just a workaround I've found to make my WebGL work in itch.io 

Not everyone is having this problem and this is not the right way to release a game in any way. But for testing purposes it seems ok!

thx so much! i look foward to making more itch.io games!

Admin(+1)

I really recommend you check your browser’s console. This is an error with how you have built or exported your game, and not related to any part of itch.io. Hope that helps

(+3)

Hey Leafo! I just came here to search for any posts regarding a similar issue I had.

It seems Unity 2020 (which just got released) has changed the way WebGL builds are loaded - could this be interfering with itch.io's iframe setup? I've also noticed that builds from 2020 can't seem to properly inform their size for the auto-detection feature.

Here's Unity's post about this.

Admin (1 edit) (+2)

The size detection could break if they changed the HTML markup they put in the template. If you have a blank Unity 2020 project exported I can test out I can take a closer look, otherwise I’ll go install the latest version to create a blank project for testing.

(+3)

I've uploaded a test project here: https://yanko.itch.io/test-webgl  (password is itch) - I imagine you can download the zip file from the admin backend right?

In vanilla projects, there's also a loading issue that seems to be circumvented if the build disables gzip compression entirely (which could be related to their changes as well, I think).

Admin (1 edit) (+2)

Thanks, I also exported a build last night and spotted the issue. I’ll try to get a fix out soon. In the meantime, there should be a similar option with the latest version of Unity that will let the game load called Decompression Fallback.

It shouldn’t be necessary to disable compression entirely, but you will need to include the JS decompressor with your build until we deploy the change to insert the server headers they expect.

(+3)

Thanks for looking into this! I just needed to get a prototype up, so I disabled compression and it was fine. Mostly following up on this because I imagined a bunch of people would end up with the issues creeping up with 2020 and it might take a while for someone to flag it properly.

Let me know if you need any help on tracking this down any further!

Admin (1 edit) (+17)

I’ve deployed a new version of our HTML game extraction service that should work for GZIP compressed Unity 2020 projects. I also pushed some fixes to make decompression for older Unity games go faster by taking advantage of browser decompression instead of the fallback javascript one.

Note that I’m still resolving some issues with our CDN configuration for brotli compression, but that should be fixed in the near future. Brotli appears to be the default so you’ll have to update the “Player settings” dialog to specify gzip directly.

Due to how caching works in our system, to take advantage of this update you will have to delete your build and reupload it.

(+4)

You're the best, thanks a bunch!

Admin moved this topic to General Development