Exporting your project to itch.io
- Open File -> Build Settings
- Choose the WebGL platform and click the “Switch Platform” button. Wait several minutes if necessary.
- If you see the error “In order to build a player, go to ‘Player Settings…’ continue to next step. Otherwise skip next step.
Fix error in Player settings
- Go to Edit -> Project Settings
- Click ‘Player’ in the left menu
- On the right, in ‘Other Settings’ uncheck ‘Auto Graphics API’. The warnings should go away.
Build and Run your project in WebGl
- Open File -> Build Settings again
- Press the ‘Build and Run’ button. Choose a place to save your project. I usually save it in a folder called Build in my project folder.
- Wait a few minutes
- Check that your browser opens with a working version of your project.
Note: click your mouse inside the game window in order to use the mouse properly while you’re playing.
- Find the location of your build. Mine is in my project folder, in a folder called ‘Builds’. You’ll need to locate these files for the next step.
Note: if you open the index.html file in your Builds folder to open it in a browser, the game may not play. It needs to be run by a local server. You can click ‘Build and Run’ in Unity to run it again.
Get the project ready for Itch
- Find the Build folder in your project folder
- Zip that whole folder (on Windows, right click the folder and choose Compress to Zip File. On Mac, right click on the folder and choose Compress)
Go to http://www.itch.io
- Make an account if you don’t have one.
- Go to your account dashboard (top left of browswer window)
- Click ‘Create New Project’, red button
- Enter a title
- For Kind of Project choose HTML
- For pricing you can choose No Payments (unless you want payments)
- In the uploads section, choose Upload Files. Select your zipped Build folder and upload it.
- Once it uploads, check ‘This file will be played in the browser’
- For Embed Options, you can enter a size to set a size for your embedded game. Or you can leave it unchanged.
- Click Save and View Page at the bottom