Load folder as asset / make 800+ images availiable on frontend only? #3672
-
Hey, Is there a way to load a folder of asset images without 800 lines of asset macros? I am still fairly new to Rust and developement in general (1st year university student), so I apologize in advance for anything I did wrong so far. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, you can include a whole folder with the asset macro like this: let folder = asset!("path/to/local/folder");
let file = format!("{folder}/file/within/folder.png"); |
Beta Was this translation helpful? Give feedback.
Yes, you can include a whole folder with the asset macro like this: