Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
Hello,  I tested your application to see if it could run an HTML5 game created with Unity. Unfortunately, the framework.js script is compressed, and when I run your application, I get an error message. Apparently, the web server hosting the content is misconfigured and isn't serving the file when the HTTP response header is "Content-Encoding: gz".The solution is clearly at this address:https://docs.unity3d.com/2020.1/Documentation/Manual/webgl-server-configuration-code-samples.html . Your project might not be to extend compatibility to games created with Unity in HTML5, but I think it would be a good idea ;)

Hi.
Thank you for your ideas.

Maybe this is what are you looking for:
https://ryanbram.itch.io/valet-lightweight-local-web-server-and-browser-launcher

Please let me know if you find any issues.

I reported the problem in the comments of the page: https://ryanbram.itch.io/valet-lightweight-local-web-server-and-browser-launcher
In Rover:  The Express server serves static files.  But for Unity, you need to check:  MIME headers  .wasm support. Therefore, I think you should add the following to the server script:const express = require('express'); const path = require('path');  const app = express(); const PORT = 3000;  const contentPath = path.join(__dirname, 'content');  app.use(express.static(contentPath, {   setHeaders: (res, filePath) => {      // WebAssembly (OBLIGATOIRE)     if (filePath.endsWith('.wasm')) {       res.setHeader('Content-Type', 'application/wasm');     }      // Unity data files     if (filePath.endsWith('.data')) {       res.setHeader('Content-Type', 'application/octet-stream');     }      // Disable cache (debug friendly)     res.setHeader('Cache-Control', 'no-store');   } }));  app.listen(PORT, '127.0.0.1', () => {   console.log(`Unity WebGL server running at http://127.0.0.1:${PORT}`); });  module.exports = PORT;

Thank you for the Unity documentation.

Now you can try Valet again, which I have tried to adapt to Unity's needs.