Skip to content

Process an asset directory for consumption on Wasm32 #11965

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

Open
spectria-limina opened this issue Feb 18, 2024 · 0 comments
Open

Process an asset directory for consumption on Wasm32 #11965

spectria-limina opened this issue Feb 18, 2024 · 0 comments
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Feature A new feature, making something new possible

Comments

@spectria-limina
Copy link
Contributor

What problem does this solve or what need does it fill?

Because HTTP by design does not support directory listing, it is impossible to use asset_server.load_folder on 2asm32.

What solution would you like?

It should be possible to process a directory, as one might process any other asset, and store the processed directory on the filesystem. Then, when the asset is loaded on wasm32, it only loads the already-processed directory asset file.

What alternative(s) have you considered?

  • Manually writing out the directory's contents as a separate resource. This requires maintaining the directory file and is prone to error.
  • Using separate automation to write out the directory's contents. This is quite viable but undermines the Assets v2 goal of being able to do the entire pipeline entirely in Bevy.

Additional context

See #9932 for an example of a use case that will not work on wasm32.

@spectria-limina spectria-limina added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Feb 18, 2024
@BD103 BD103 added A-Assets Load files from disk to use for things like images, models, and sounds and removed S-Needs-Triage This issue needs to be labelled labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

2 participants