Just after creating a new project in Itch.io, you only need to fill/enable 3 options to make this playable on browser:
Kind of project: | Select HTML. |
Upload Files: | Be sure to upload a .zip file, if this is generated via Unity it will already have the needed index.html file to play on browser. |
Enable option: | “This will be played in the browser”. |
That’s it!
Always test this built both locally and in Itch.io website, as with newer Unity versions (2020+) there may be some problems based on the engine compression. You may see the game not loading locally, but actually loading through Itch.io browser. If you see the following error:
both async and sync fetching of the wasm failed
Here’s how to fix it:
Go to Unity > File > Build Settings > Player Settings > Compression.
Option 1) There disable Compression, and enable Decompression Fallback.
Option 2) If the previous doesn’t work, select GZIP compression and enable Decompression Fallback.
