In order to deploy your games onto a website, you will need to build your game using the “WebGL” build settings. To do this, simply select “WebGL” from the “Platform” box within the “Build Settings” window and then click the “Switch Platform” button located on the bottom right.
Sometimes you have to adjust conflicting Project Settings.
If there are any conflicts with your project settings you should see a warning prompt such as the one in the example below.
If you click on the “Player Settings” button in the “Build Settings” window.
You should be able to see the conflicting setting(s) which in this case is that the “Color Space” needs to be set to “Gamma” instead of Linear.
Build & Deploy
Now select the “Build” button within the “Build Settings” window and set your desired file location. Once it’s done compiling you should see similar files to the ones shown in the example below within your selected folder.
If you have a web server, you could take these three files and upload them onto there and allow your product to be played. Notice that if you click on the index.html file you can actually launch a WebGL window.
If you compress this entire folder then upload it onto your “itch.io” page then you can create a link that allows you to access and play your game directly from your browser!