Reputation: 3624
I build on unity successfully
if I run and build on unity it works
but when I run index.html on browser from build folder;
first it has been blocked by CORS policy I created a chrome shortcut disables security
then I got
Uncaught ReferenceError: unityFramework is not defined at HTMLScriptElement.n.onload
I looked into it and some said that to disable compression but I got more errors:
dont know much about webGL and not sure if its a problem on unity or browser
pls help
ps:my unity version is 2020.1.0f1
Upvotes: 1
Views: 3183
Reputation: 1704
Browsers won't load javascripts (.js
files) from a file system directly. You have to host them on a server. Running the server on your local machine is fine (it's what Unity does).
Upvotes: 3