~starkingdoms/starkingdoms

ref: 00049e064ff12a9c9b93674670410045b4ddaa7c starkingdoms/crates/client/src/rendering/assets_native.rs -rw-r--r-- 299 bytes
00049e06 — ghostly_zsh svg support 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use bevy_ecs::system::Resource;

#[derive(Resource)]
pub struct Assets {

}
impl Assets {
    pub fn new() -> Self {
        Assets {  }
    }
    pub fn get(&self, local_path: impl Into<String>) -> Option<Vec<u8>> {
        std::fs::read(format!("src/textures/{}", local_path.into())).ok()
    }
}