My 90 day journey becoming a Unity game developer: Day-42

Rhett Haynes
2 min readAug 2, 2021

--

Objective: Create a build for WebGL.

Go to File->Build Settings and click on WebGL. There is an error message that we will have to address which is that we have to modify the color space in Player settings. We will do that after we switch platforms by clicking on Switch Platform.

After switching platforms, click on Player Settings. Come down to Color Space and under Rendering, change from Linear to Gamma. When the change to Gamma is complete, we should see the error message disappear.

Now we can select Build by clicking on it and we will be asked where to save the WebGL build. Create a new folder name something like WebGL_demo and save the new build inside of this folder.

If you go to your WebGL folder, you will see 3 items that should be used to play the game in your server inside your website.com by uploading these items.

I had problems setting this up as 2 problems arose. The first was my assets was conflicting with the UnityEditor.BuildPlayerWindow. I had to click on the asset plugin and exclude all platforms for the build to work. But the second problem was my hard drive was crashing and when I did an error check, it told me to back-up this drive immediately before it might die. Everything is working now so I’m back until I replace this drive with a new one.

--

--

Rhett Haynes
Rhett Haynes

Written by Rhett Haynes

Learning to become a Unity game developer.

No responses yet