Problem with relative URLs when using WASM

I like to have 2 games available from the same index.html file, selected by script. The hierarchy is like this:
index.html
/game1/Build/game.json,game.unityweb,game.wasm etc
/game2/Build/game.json,game.unityweb,game.wasm etc

This works fine by adapting the src of the script locations and the location of the json file.

However, if WASM is enabled, the WASM fetch is hard-coded to the “Build/” folder off the root, and can’t be changed. I even tried editing the JSON but it didn’t work.

All the other files respect the relative paths. Just the WASM file returns 404 not found error.

Any ideas for a workaround would be welcome, but I specifically don’t want to have more than one index.html hence the scripting.

Thanks

You can override it: 2019.1

We do basically the same thing but for different reasons…desktop users get build X (MSAA On), mobile users get build Y (MSAA Off).

1 Like

I really don’t know why they didn’t just support relative paths like, well, everything on the Internet.

Thanks for saving me a ton of time, have a great weekend.