pub fn make_directory_database(
directory: impl AsRef<Path>,
) -> Result<AssetDatabase, Box<dyn Error>>
Examples found in repository?
examples/hello_world.rs (line 170)
168fn main() -> Result<(), Box<dyn Error>> {
169 GameLauncher::new(GameInstance::new(Preloader).setup_assets(|assets| {
170 *assets = make_directory_database("./resources/").unwrap();
171 }))
172 .title("Hello World!")
173 .config(Config::load_from_file("./resources/GameConfig.toml")?)
174 .run();
175 Ok(())
176}
More examples
Hide additional examples
examples/path.rs (line 127)
125fn main() -> Result<(), Box<dyn Error>> {
126 GameLauncher::new(GameInstance::new(State::default()).setup_assets(|assets| {
127 *assets = make_directory_database("./resources/").unwrap();
128 }))
129 .title("Path")
130 .config(Config::load_from_file("./resources/GameConfig.toml")?)
131 .run();
132 Ok(())
133}
examples/pcg_island.rs (line 278)
276fn main() -> Result<(), Box<dyn Error>> {
277 GameLauncher::new(GameInstance::new(State::default()).setup_assets(|assets| {
278 *assets = make_directory_database("./resources/").unwrap();
279 }))
280 .title("Procedural Content Generator - Island")
281 .config(Config::load_from_file("./resources/GameConfig.toml")?)
282 .run();
283 Ok(())
284}