How to upload your WebGL build to HTTP Server

How to upload your WebGL build to HTTP Server,linking pictures of error with it.Plz some one help me


You cannot tell a browser to go look at files on your hard drive, at least not for file references within (say) an HTML file. There would be enormous security vulnerabilities if you did so.

Instead you need to webserve the directory. Node.js has a simple http server you can install and serve the pages. When you start it, it gives you an URL, often a loopback URL (127.0.0.1) and a port, and you hit that in your browser to view the built game.

Unity will do this once when you hit BUILD in WEbGL mode but I don’t think there is any way to have Unity keep serving it. Maybe someone else can correct me?

1 Like

Your URL isn’t even pointing to an HTTP server.

1 Like