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

Unity WebGL (GUIDE)

A topic by Paris created Jul 29, 2023 Views: 339 Replies: 3
Viewing posts 1 to 5
Submitted(+4)

As we are approaching the final day I wanted to share this guide for getting perfect Web GL builds in unity (use Unity 2022+)


Steps for web gl build in unity: Make sure you have web gl module installed in unity hub:

if you can’t select it here then it means you need to install the module.

Once you have web gl installed and you restart unity, you can go to build settings window and click on WebGL, choose “Switch Platform”.


Next in the bottom left click Player Settings button (on the same window you’re on)

select webGL tab:

Choose these settings:

Publishing Settings (Important)

(Needs Gzip, Decompression Fallback = on)


Now you are ready to build (make sure your scenes are in the build index

Any scene not here wont be in the game on build#

Select Build:

Next choose an empty folder (must be empty, you can make a new one)

once the game is built, open the folder it output into and select all files > Send to zip

Make sure it’s the files in the folder, not the whole folder itself.

Now you can upload this .zip file to Itch.io game page.


This should provide you a perfect working web-build!


Some tips from njitram:

If you are below unity 2022:

Unity automatically adds a fullscreen button so you don’t need to check that (or you end up with 2 fullscreen buttons.

Also, Unity adds a bar below your game stating your project name and containing the fullscreen button. You should add 40 pixels to your Viewport dimensions in Itch to make sure this bar is fully visible or you end up with a half visible bar instead.

Bump

Submitted

If you need help with Web GL today let me know!

Hi, I can't seem to figure this out. I have used WebGL before from time to time but it isn't working this time. I uploaded an image that is part of my error, I can send the rest. If you are able to help that would be awesome, but unfortunately, I don't know if we have the time. Thank you in advance!