-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
Add an attribute for prefixing all variant filenames.
Idea
Currently, Variant names are just lowercased and used as the filename. You can always specify a filename too on a Variant, but what if you want all filenames to be prefixed, maybe by a random string, maybe by the enum name, up to you.
use asset_derive::Asset;
#[derive(Asset)]
#[asset(prefix = "icon-")] // <-- Default for this enum, all filenames will be prefixed with `icon-`.
enum Icon {
Select,
Folder,
#[asset(prefix = "icon-dim-")] // <-- This Variant will override the default prefix for itself.
FolderDim,
}Conclusion
It isn't that useful of a feature, but it definitely is an idea and something that could be added.