1👍
✅
The fix was to move the "Build" folder into "static." Don’t forget to change the path of the game files in the UnityWebgl
creation like this:
const Unity = new UnityWebgl({
loaderUrl: '/Build/look-away-webGLbuild1-uncomp.loader.js',
dataUrl: '/Build/look-away-webGLbuild1-uncomp.data',
frameworkUrl: '/Build/look-away-webGLbuild1-uncomp.framework.js',
codeUrl: '/Build/look-away-webGLbuild1-uncomp.wasm',
})
Also the developer that spotted this fix pointed out that if you don’t change ssr: true,
to ssr: false,
in nuxt.config.js
, the window
parameter in the look-away-webGLbuild1-uncomp.loader.js
will be underfined
. This makes it so that when you refresh the page you get this error:
Source:stackexchange.com