diff options
author | 2024-06-17 19:37:21 -0400 | |
---|---|---|
committer | 2024-06-17 19:37:21 -0400 | |
commit | 462d6c5aaa2281bf875e04d5e2c3241a13256836 (patch) | |
tree | 742112db5e0c5554ba0c7a55ea48d3f0cba30dc9 /src/lib.rs | |
parent | ebc3ccfea4027a3eb0c80f6a3d64b6425d32d1ef (diff) |
Mon Jun 17 07:37:21 PM EDT 2024
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -4,7 +4,7 @@ use std::path::PathBuf; -use bevy::prelude::*; +use bevy::{asset::io::AssetSource, prelude::*}; use events::DirworldNavigationEvent; use resources::{Dirworld, DirworldConfig}; @@ -25,7 +25,12 @@ pub struct DirworldPlugin { impl Plugin for DirworldPlugin { fn build(&self, app: &mut App) { + info!("building"); + let path_string = self.path.to_string_lossy().to_string(); app.insert_resource(DirworldConfig::new(self.path.clone())) + .register_asset_source("dirworld", AssetSource::build() + .with_reader(AssetSource::get_default_reader(path_string.clone())) + .with_watcher(|_| None)) .add_event::<DirworldNavigationEvent>() .init_resource::<Dirworld>(); } |