amethyst_assets::Source Equivalent
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
I was attempting to part an old `amethyst` 0.14 project to `bevy` that utilized a custom [`Source`](https://docs.rs/amethyst_assets/latest/amethyst_assets/trait.Source.html) to load assets from a WAD file (a type of binary to store files and metadata). I believe I could mimic the functionality using [`AssetIo`](https://docs.rs/bevy/latest/bevy/asset/trait.AssetIo.html), but that would either limit me to only loading from the WAD file or I would need to add a fallback to load assets from the filesystem or any other asset store.
## What solution would you like?
I would like some way to have something akin to multiple [`AssetServer`](https://docs.rs/bevy/latest/bevy/asset/struct.AssetServer.html)s or a way to provide an `AssetServer` mutliple `AssetIo`s to allow assets to be loaded from multiple locations easily.
## What alternative(s) have you considered?
I have considered making a custom `AssetIo` implementation that falls back to the default filesystem backed `AsstIo` when attempting to access files outside of a WAD file. That, however, seems like a hack as it seems to me like it would be hard to extend with other asset storage locations and specific to my game making it hard to share with the community.
## Additional context
[`amethyst_assets::Source`](https://docs.rs/amethyst_assets/latest/amethyst_assets/trait.Source.html)
[`amethyst_assets::Loader`](https://docs.rs/amethyst_assets/latest/amethyst_assets/struct.Loader.html) - I believe this is the equivalent of `bevy`'s `AssetServer`. It allows providing alternative asset sources as well as a way to change which one is the default source.
Contributor guide
Research direction
Start by reading the linked AssetServer and AssetIo APIs, then compare them with amethyst_assets::Source and Loader. Determine how multiple asset locations should be selected and composed, including filesystem fallback and other stores. Done means the design is agreed and the requested multi-source loading behavior is specified clearly enough to implement and test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100