Closed juankxxD closed 1 year ago
Could you try removing the leading period from the URLs?
I already fixed it, the problem was with the extension of my build files, I had to use the 'gunzip' command on each '.gz' file to decompress 'build.framework.js.gz', and it's working now.
Please avoid duplicates
Language and Compiler
Babel and WebPack JavaScript
What environment are you using?
Local Development Server
When does your problem occur?
When the Unity Component mounts
What does your problem relate to?
The problem seems Unity related
React-Unity-WebGL Version
9.4.3
React Version
18.2.0
Unity Version
2022.3.11f1
What happened?
When I create the useUnityContext and place the Unity component, these errors appear:
Uncaught SyntaxError: Unexpected token '<' (at build.framework.js:1:1)
Unable to parse Build/build.framework.js! The file is corrupt, or compression was misconfigured? (check Content-Encoding HTTP Response Header on the web server) build.loader.js:1 Uncaught ReferenceError: unityFramework is not defined
at i.onload (build.loader.js:1:7809) And then, this message appears:
[UnityCache] 'http://localhost:3000/Build/build.data' successfully downloaded and stored in the indexedDB cache
Reproducible test case
Would you be interested in contributing a fix?