I am trying to deploy a node.js app on heroku , which is serving unity webGL exported game to clients. After Unity3d 5+ release , WebGL exports by Unity uses gzip compression by default .
Well ,
heroku server [Node.js] dont serves gzip compressed files , which is causing my Game to throw error in console on load , main unity loading window wont update (just blank) till files dont get completely download & a slight delay while browser manually decompresses it.
These are the file types Unity WebGL Export provides = || . datagz || . jsgz || . memgz ||
So what i need is , a way to configure heroku node.js server for serving the gzip compression .
1 Answers
Answers 1
It doesn't look like you are having issues serving gzipped files. The messages in the console could be a separate issue altogether.
What is more likely is that your node app is not serving the right folder or files. If you can provide a list of files that is in your build folder (I assume that this is where Unity places its files), I can take a look.
Also, do review your Heroku configuration, namely the command used by the web process. If it is npm start
or something, then look at the script it points to (see in your package.json
file), and see if it is serving files out of the build folder.
0 comments:
Post a Comment