|Error on runing WebGL Build

Hi


Got this error when launching my WebGL game… any idea what that means?
Any is there a better place to post this type support request?

Thanks.

Does it work properly when you Build and Run locally?

I can’t run a WebGL build locally… because I have an error like : you’re browser does not support running from local host… something like that.
I made some research…

And the suspect number one seems to be

  • using System.Net.WebSockets;
  • using System.Threading;
  • using System.Threading.Tasks;

see “hholanda” response. The hard thing here is that if that is the , that mean I have to say good bye to Unity Adressable… which uses Threading… and rip apart a lot of game’s code when is ready for released… I will do some testing in the meantime…

Just compare to a new/empty WebGL project. Does that work? Then go from there.


Here is a brand new project … I installed WebGL publishing package and the empty project works perfectly when uploaded to Unity server. I does not locally… but that has no importance for now.

I did some test regarding

  • using System.Net.WebSockets;
  • using System.Threading;
  • using System.Threading.Tasks;

I used them in my empty project… unity server Web GL has no error. But it is definitely problematic because, Task does not work properly with WebGL.
In the unity code, I asked in an async Task to move this logo few pixel toward the right every 1000ms , and to iterate the value of text Task step from 0 to
10… the result in the Web GL build is that the logo does not move, and the value of text does not iterate.

Since my game do a lot of data loading in async task … there may be may be problems coming from there… I am now going to strip that away and replace with coroutines…

The webgl build is here:|
https://play.unity.com/p/webgl-builds-195520/edit
Now I made a back up of the project… and will remove some code here and there until it works:
https://play.unity.com/p/webgl-builds-195520/edit