-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
Add support for loading assets at runtime instead of just compile time (in the binary).
Idea
I believe this should be quite simple to implement once compile time loading is fully fleshed out.
I have an idea for some sub-attributes that would work for this and they would generate a function load()
that will handle the loading.
use asset_derive::Asset;
#[derive(Asset)]
#[asset(load = "static")] // <-- Default for this enum
enum Icon {
Select,
Folder,
#[asset(load = "dynamic")] // <-- This Variant will not be loaded in at compile time, but will get a function to load in at runtime...
FolderDim,
}Conclusion
Still more to flesh out, but this sounds solid enough and shouldn't be too difficult to implement.
Reactions are currently unavailable