vleue / bevy_embedded_assets

Bevy plugin to embed assets in your game
156 stars 10 forks source link

Assets in subdirectories don't load on Wasm unless you use the proper slash type #7

Closed Red-Teapot closed 1 year ago

Red-Teapot commented 1 year ago

Issue

If some conditions are met:

then the aforementioned assets won't load.

How to Replicate

Expected Result

Assets being actually loaded.

Notes

Apparently Paths do not convert forward slashes into backward ones in Wasm builds, which is the cause of the problem.

I think using backslashes won't fix the problem: it will break on Linux/MacOS instead (I haven't tested it, but I assume backslashes won't be converted into forward slashes on these platforms).

This is inconvenient since it hinders cross-platform development.

mockersf commented 1 year ago

What web server are you using to serve the wasm file? Does it also serve the asset directory? What is the request you see in the browser console? Nevermind I missed in which repo we were 🤦

mockersf commented 1 year ago

Just published 0.6.2 with a fix for that, thanks for the report!