Posted January 31, 2022 by KeyboardKrieger
Hi folks,
if you got this error:
But your Console looks like this:
Then you have a problem. The same problem as I had.
I just finished my first Alpha build, everything worked fine. The Windows Build worked fine and days ago the WebGL build worked fine too. But out of nothing it did not work anymore. What to do? At first I googled it and found this thread:
There were provided two ways to fix this:
For some people this already helped. In my case both did not help. What now? Luckily I had another problem some time ago for which I had to go to the Editor Logfile for the first time in my life. I tried this here too and I found that I had some integration problems with an asset I bought on the Appstore. For those of you who never encoutered this problem, this is how you do it:
Open your Windows Explorer and first of all activate "Show hidden files", because the files we are looking for are hidden. When this is done, go to this path"C:\Users\{YOUR USERNAME HERE}\AppData\Local\Unity\Editor" and look for the file "Editor.log". In that file you find a more detailed log and if you are familar with coding and debugging in general you are also probably able to find your error here.
In my case I have some code integrated which is only used in WebGL an marked with "#if (UNITY_WEBGL && !UNITY_EDITOR)" in the Editor. So while in Editor mode nothing happens with these snippets and sadly I also couldn't see the error also. In my Editor.log they were printed correctly, so I could track em down in my code and fix them.
I hope this helps some of you guys who struggle with WebGL build too. For me this is the part which is the greatest pain in the ass while developing. But for showing a demo of your game it is the best way, so we have to deal with it.
If you have any further questions feel free to ask.