WebGL Build working

Part 2 Update project to newer version of Unity

In these articles we will review some issues we encounter when finishing up our work on this project.

We will mention various things we tried to identify the problem. These methods can be used for finding other issues as well.

WebGL Build 2017

In our case the PC build was working fine. The WebGL version however was game breaking issues.

When reaching a certain places in the game we couldn’t click and move for unknown reasons. This only happened in the WebGL build.

Upgrade the project to a newer version 2019

What finally fixed our WebGL Build issues was updating the nav mesh and updating to a newer version.

When updating to a newer version a lot of this project breaks. Below are some things we had to deal with to get our project working in the newer version of Unity.

Update Script

We got the following error:

‘MinAttribute’ is an ambiguous reference between ‘UnityEngine.PostProcessing.MinAttribute’ and ‘UnityEngine.MinAttribute’ from the MinDrawer.cs file…

This simple means the code used can mean two thing so we need to specify which one we mean. To fix it add a single line at the top:

using MinAttribute = UnityEngine.PostProcessing.MinAttribute;

Update Cinemachine

The newer version of Unity also uses a newer version of Cinemachine. This gave us many errors in the Console.
We had to delete Cinemachine from the project panel and using the package manager re-import the newer version of Cinemachine.

Post Processing Profiles

This is similar to the Cinemachine. We had to delete the old version and get the newer version for post processing. We saved our old Unity version and opened it side-by-side to copy the values from our old profiles to recreate our post processing profiles.

Generate Lighting Data

Before Generate Lighting
After Generate Lighting

Error: Lighting data asset is inconsistent because X files out of Y are missing.
To fix the above error we generated our Lighting Data again.

Window > Rendering > Lighting Settings > Scroll down > Generate Button

Final words

After lots of tweaking we still didn’t get the same look as in the previous version of Unity, but it’s working and different parts look better then before. In our next article we will host our game for all to play.

--

--

--

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

將 appsetting.json 的設定 注入 controller

Quickly amend a git commit

How to create RDS instance in Amazon cloud .

Experimenting GitHub Container Registry

Signature Verification using Deep Learning

Dockerize a Python application, work with containers.

PyTorch Methods

Web-Hosting Services on Bluzelle Testnet

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tristan Engel

Tristan Engel

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.

More from Medium

Discord Login Unblocked

raise a custom exception

Why we recommend Authy for 2FA

Automating Unity Build Pipeline