Search code examples
google-chromeunity-game-engineunity-webgl

Unity WebGL for Chrome [Browser-Fix-Needed]


I created a project in unity and exported it as WebGL, but when I open it in Chrome, I get this message (Please see image attached). If there is a fix, I need it to not have to be manually applied to the browser (if possible).

This is the error that pops up in the chrome browser


Solution

  • As the error states you cannot retrieve the resource you're looking for from an url that is prefixed with file:// (probably an image or a sound, your url probably looks something like file://SomeFolder/Foo/bar.jpg)

    Instead you need to host it somehwere the allows you to access the resource through http, and receive the resource over http.so you get an url like http://somehost.com/somefolder/bar.jpg. you could do this using FTP or hosting yourself