How to Host Unity Games on the Web
Day 32- Making 2D Space Shooter Game
Objective: Build your game for WebGL and host it in web
Let’s start by building your game for WebGL platform. Be sure you have installed WebGL support. If not then you will get ‘Install with Unity Hub’ instead of switch platform so keep note of that as well.
After clicking Switch Platform, it will take a while so wait and your platform will be switched to WebGL.
After the switch, if you get this message then remember that you need Gamma in your color space.
Then Build your game and we will look at how to host the game in web.
Now go to itch.io, which is a free and can host your build here or you can host in your own site using anchor tag.
After you have created an account in itch.io, select the drop-down just next to your profile and select Upload new project.
Next window will open where you can add your game details. In the Kind of project, select HTML.
Upload your file as .zip then change your preferred settings then select Save and View Page.
You can edit your themes and check if your game is looking Ok. If it is then go to Edit game and set your game to public and you are good to go.