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.
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;
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
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
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.