bevyengine / bevyengine/bevy

Allow adding and removing asset sources at runtime.

Open
#21,758 0 comments 3 reactions 0 assignees View on GitHub
A-Assets C-Feature S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

Currently, all asset sources must be registered **before** the asset plugin is initialized. This effectively means that asset sources are fixed for the entire lifetime of your game.

Ideally, asset sources should be able to be added or removed at runtime. For example, a mod for a game could store its data as a ZIP file, and this ZIP file could be added as an extra asset source. Then the mod's assets can be loaded just like any other asset.

Removing asset sources should also be supported as something like a mod may wish to be unloaded to reduce memory usage.

This also could resolve #10162 since of course asset sources added after the `AssetPlugin` must also be accounted for (though this may result in the opposite problem that asset sources registered before the AssetPlugin may fail, but that is much less surprising).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.