when i click build and run in the unity editor my application works perfectly but, when i click build and open the index.html file my game gets stuck at the loading screen and in the console it spits out a few error’s listed down below. i am very inexperienced with html programming and i have no clue hot to fix this.
error’s:
Access to XMLHttpRequest at ‘file:///C:/Users/‘USER’/Desktop/‘PROGRAM’/Build/Build/Build.data.br’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Failed to load resource: net::ERR_FAILED
Uncaught SyntaxError: Invalid or unexpected token
Uncaught ReferenceError: unityFramework is not defined
at HTMLScriptElement.n.onload
edit: the first error was because i opened it as a file so i put it on a server and now i only get the last 2 error’s