-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssetServer.load_folder() fails in wasm while individual load() calls work #2916
Comments
Loading an asset in wasm in Bevy is opinionated and is done as an http request for that file, which most servers should support out of the box. Loading a folder would mean being able to list its content, which is even more opinionated and often blocked on servers. This doesn't work currently... as it's not even implemented in Bevy bevy/crates/bevy_asset/src/io/wasm_asset_io.rs Lines 37 to 42 in 07ed1d0
|
Do you mind developing what's opinionated here?
I agree, I didn't think about this, obviously most server disallow listing content. I've replaced |
A warning was added in #5827, and it seems like there's not really a path forward to support Should we close this? |
@rparrett sounds good to me. |
Sorry, forgot to reply... When loading an asset in wasm, Bevy does a http get request to the relative URL |
Ah yes agreed. Well it's more than opinionated, it's very limited and should be improved, but I believe that's already planned as part of the asset work maybe? Or at least there's a Bevy architecture and third-party crates to work around that. |
Bevy version
0.5.0
Operating system & version
Windows 10
What you did
Build https://github.com/djeedai/libracity/tree/wasm in wasm.
What you expected to happen
Can load both individual assets and entire folders when targeting wasm.
What actually happened
asset_server.load("models/file.gltf")
loads fine with both wasm and native.asset_server.load_folder("models")
returns an errorAssetFolderNotADirectory("models")'
in wasm, but works in native.Additional information
The text was updated successfully, but these errors were encountered: