Add temp:://
AssetSource
for Temporary Assets
#13403
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
D-Modest
A "normal" level of difficulty; suitable for simple features or challenging fixes
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
X-Uncontroversial
This work is generally agreed upon
What problem does this solve or what need does it fill?
In certain contexts, it is advantageous to store temporary assets in the underlying filesystem which may or may not be deleted when the application exits.
What solution would you like?
AssetSource
, bikeshedded astemp:://
, which will use an appropriate system folder to store assets written to it during runtime.tempfile
crate is currently transiently included in Bevy, so an implementation based on it should have no impact on build times.temp://
source will be explicitly cleared on startup.temp://
source will be explicitly cleared on exit.What alternative(s) have you considered?
Temporary assets can currently be stored in-memory, and thus automatically "deleted" on program exit.
Additional context
Yeah a bit tangential. I don't think the Asset Sources feature needs proving out as its already in use, but I do think a
temp://
asset source would be useful. Worth implementing!Originally posted by @cart in #13312 (comment)
The text was updated successfully, but these errors were encountered: