-
-
Notifications
You must be signed in to change notification settings - Fork 170
Description
Please avoid duplicates
- I checked all open issues and discussions and none of them matched my problem.
What environment are you using?
Local Development Server
React-Unity-WebGL Version
9.7.0
React Version
18.2
Unity Version
6000.0.35f1
What happened?
in Unity 6 with WebAssembly2.0 enabled, the Enable NativeC/C++ threading support option is quite stable for our application and provides a big performance boost, however when trying to use it with react-unity-webgl, the build fails to load
I believe this is because there is a missing field for the worker url specified in the unity config. In their template, it's enabled when threads are enabled, but it seems to be impossible to configure in react-unity-webgl
If you enable the above option in unity 6, it should be easy to reproduce the issue
Reproducible test case
createUnityInstance(document.querySelector("#unity-canvas"), {
dataUrl: "Build/Build.data.br",
frameworkUrl: "Build/Build.framework.js.br",
workerUrl: "Build/Build.worker.js.br", //this is missing in react-unity-webgl
codeUrl: "Build/Build.wasm.br",
streamingAssetsUrl: "StreamingAssets",
companyName: "App",
productName: "App",
productVersion: "1.0.0",
})
Would you be interested in contributing a fix?
- yes, I would like to contribute a fix