I see that support for this has been added in 2019.3. What is the browser situation currently? Which browsers has enabled multithreading (shared array buffer) fully?
Unfortunately not many as of yet: Can I use... Support tables for HTML5, CSS3, etc but it . looks like the gears are slowly starting to turn to get it re enabled.
@ChristianKoGaMa Hi! Where did you find the info that support for multithreading has been added in 2019.3? The info in the Unity documentation for WebGL in 2019.3 still states the following:
- Threads are not supported due to the lack of threading supporting in JavaScript. This applies to both Unity’s internal use of threads to speed up performance, and to the use of threads in script code and managed dlls. Essentially, anything in the System.Threading namespace is not supported.
We added WASM multi-threading as an experimental feature in 2019.1 but due to the CPU exploit issues this has not been spread as far as folks were hoping as the link above shows.
@Schubkraft Is WebGL threading technically possible in 2019.x by setting webGLThreadsSupport to 1 in project settings?
– @Schubkraft Is WebGL threading technically possible in 2019.x by setting webGLThreadsSupport to 1
Re: multithreading and WebGL – you are damaging good will with developers by heavily marketing this feature and then failing to explain the degree to which it is working, isn’t working, or even should be expected to work. Is this related to the issue with ConcurrentDictionary.Count causing the WebGL player to crash?
@Schubkraft we’d also love to get more info about the extent to which webGL multithreading is functional. It’s in FireFox nightly and shipped a while ago with Chrome 74.
Ah, I found some info in the webgl roadmap post :
I’m interested in knowing whether the experimental multithreading support in 2019.3 & 2020.1 is for the internals of the Unity engine only or if anything in Sytem.Threading.* works yet
Update that WebAssembly threads have shipped with FireFox 79: Firefox 79: The safe return of shared memory, new tooling, and platform updates - Mozilla Hacks - the Web developer blog
I can confirm multi threading enabled worked on chrome but still displays the error message for firefox both 79 and 80.
Only worked with a empty cube scene so far. Didnt work with my ecs project though.
Was tested on 2020.1.1 I believe.
interesting
I tried to enable WebGLThreadsSupport in 2020.1.2 and it breaks builds, the project does not compile after this setting is enabled. Looks like this feature is broken in 2020.1.2
What unity version do you have? I cant enable this function in 2020.1.2 cause builds start failing
Edit:
My bug was reproduced with Unity QA Team:
https://discussions.unity.com/t/804788
Hi Dr ViJ, I believe that you need to build the web build with development build settings. I can confirm in 2020.1.2f that I get the same error without development, same with 2020.1.1f.
Edit: Wait never mind, dev is not working now too! Maybe I set something differently… I think it’s just not working anymore haha.
Thank you! I will try this way as temporary solution until bug is fixed.
Edit:
I tried to compile with Development Build, Unfortunatly the build failed, so I will wait for Unity Technologies fix that. But thank you for support
Is there any unity version where this currently works?
2020.1.2f, 2020.1.4f fails. 2020.1.0f works.
I had difficulties with EntityCommandBuffers inside jobs were breaking. I removed that and I got it to work. But burst didnt work. And my custom animation system uses burst to do bone skinning. Does anyone know if unitys SkinnedMeshRenders work lol
@deus0 what error(s) did you get from Burst?
Surly this can’t be true: