Setup
Install WebGL module through Unity Hub if you haven’t already. To start, in Unity, go to Menu -> File -> Build Settings. You will see the below popup –
IF you see “No WebGL module loaded”, click on the “Install with Unity Hub” button. Otherwise, skip this section.
It should open Unity Hub with this view. Just click done and wait for it to install. Once it’s open, restart Unity and reopen your project.
Switch platform
Now, when you open Build Settings, you should see this instead.
Select the “Switch Platform button”. It will start converting assets and this might take a minute or two.
Build!
Once it’s done, when you look at Build Settings, you should see this instead:
Hit the build button! It will ask you where you want to save it. Once you confirm, it will start building your project. This process usually takes a few minutes. When it’s done, locate the folder that it built the files to. For example, I named my folder Build, and here it is. Zip the folder so that it’s PROJECTNAME.zip.
Upload to itch.io
Now we’re going to upload to itch.io, which you should already have an account for.
- Make a new project
- Select HTML for Kind of project
- For embed options, you probably want “click to launch in fullscreen”
- Upload your zipped file where it says upload! Make sure to select “this file will be played in the browser”
- And that’s it!
If you want to know what it should look like, you can check out my test project on itch.