Testing Unity WebGL Build Before Deployment

Austin Hall
3 min readOct 24, 2022

--

The first time that people get to play your game can make or break you. If they have any issues or problems that pop up, they may never come back.

It may not seem important, but testing your game is a crucial part of the process. The test phase is where we find the bugs and workout the small (or large) issues before we give it to the customer.

At this point, we have created a WebGL build of our game.

If you go into the build folder and try to open the game, you may find yourself staring at this…

WebGL is designed to run on a hosting server like itch.io or simmer.io and to test your WebGL game we must tell our PC to act like a server.

Enter XAMPP

XAMPP is a web developer tool, that enables your PC to simulate a hosting server to run web applications locally instead of testing everything from a paid services hosting; using this allows web developers to test applications before uploading, we can do the same with our WebGL game.

Download application:

https://www.apachefriends.org/download.html

If you need help installing Xampp, follow this guide:
https://www.wikihow.com/Install-XAMPP-for-Windows

Once you have everything set up you must locate the folder that Xampp create called “htdocs”, in there you will put / place your WebGL build folder:

NOTE: Do not place the entire project here. Your build folder is a separate entity. If it is inside your project folder, you should move it somewhere else.

Once your WebGL build is in the htdocs folder, you will need to open the XAMPP app. Click start to turn on the Apache server.

Once Apache server is running, open your web browser. I have used Microsoft Edge and Google Chrome, so I know that both of those work. This process should work with any web browser.

you will need the file name of your build folder.

In your web browser address bar, type the following:

localhost/[name of the WebGL folder build]

Now you can test your game. Or just play it.

--

--