ReferenceError: UnityLoader is not defined
See original GitHub issueHi, I know there has been multiple issues relating to this issue and the public path. I have tried the suggested solutions but to no avail.
Errors I receive UnityLoader.js:1 Uncaught SyntaxError: Unexpected token < Unity.js:64 Uncaught (in promise) ReferenceError: UnityLoader is not defined
The unity component is loaded into another component as such
<Unity
src="Build/carviewer.json"
loader="Build/UnityLoader.js"
/>
I have the Build folder in my main app root where my index.html is. I have also tried public/Build.
Not sure if it’s relevant but my webpack config has publicPath: '/',
The unityloader.js is coming up in my sources in chrome dev tools but when I inspect it, it just shows the index.html.
Any help would be greatly appreciated. Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
WebGL build not working correctly. "UnityLoader is not defined".
1. after build is finished when i open console - i see the error- "UnityLoader is not defined". this is important from my...
Read more >UnityLoader.js not defined discussion on Kongregate
js is called in the index.html file. But the same error message of "ReferenceError: UnityLoader is not defined" keeps showing in the console...
Read more >Getting error when launching WebGL unity game
Solved the problem by moving to a non-alpha version of Unity. ... Let's start with reading the error msg: Uncaught **ReferenceError** .
Read more >Web gl build grey screen - Unity - ZapWorks Forum
1.01:87:1 Uncaught (in promise) ReferenceError: UnityLoader is not defined WaitForZCVLoad https://d9003.zappar.io/1851770358319192628/1.01/: ...
Read more >Feed Detail - BigCommerce Support
Uncaught ReferenceError: UnityLoader is not defined at (index):9 (anonymous) ... https://blackfriarsironworks.com/confabulator/content/Build/UnityLoader.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Using the Public Folder in Create React App: https://create-react-app.dev/docs/using-the-public-folder
For people like me: put your unity build in your public directory and create your UnityContent like this:
Omit the
./public
in the path. This took me forever