diff --git a/crates/plugins/src/assets/mod.rs b/crates/plugins/src/assets/mod.rs index f171864..9a6332f 100644 --- a/crates/plugins/src/assets/mod.rs +++ b/crates/plugins/src/assets/mod.rs @@ -31,7 +31,7 @@ impl Plugin for AssetsPlugin { #[cfg(not(target_family = "wasm"))] app.add_systems(OnEnter(AppState::LoadingAssets), load_assets) .add_systems( - Update, + FixedUpdate, (check_assets.run_if(in_state(AppState::LoadingAssets)),), ); diff --git a/crates/plugins/src/mesh/mod.rs b/crates/plugins/src/mesh/mod.rs index 2edadbd..cbeeea5 100644 --- a/crates/plugins/src/mesh/mod.rs +++ b/crates/plugins/src/mesh/mod.rs @@ -37,7 +37,7 @@ impl Plugin for MeshPlugin { .add_event::() .add_event::() .add_systems( - Update, + FixedUpdate, ( events::handle_mesh_chunk_requests.run_if(on_event::), events::handle_mesh_chunk_rerequests.run_if(on_event::), diff --git a/crates/plugins/src/scene/mod.rs b/crates/plugins/src/scene/mod.rs index 402c25c..30f6ea9 100644 --- a/crates/plugins/src/scene/mod.rs +++ b/crates/plugins/src/scene/mod.rs @@ -315,14 +315,8 @@ impl Plugin for ScenePlugin { .add_event::() .add_event::() .add_systems( - Update, + FixedUpdate, (( - ( - handle_update_scene_view.run_if(on_event::), - check_if_should_update_scene, - update_scene.run_if(on_event::), - ) - .chain(), ( handle::process_load_requested, handle::process_mesh_requested, @@ -332,6 +326,16 @@ impl Plugin for ScenePlugin { handle::process_unload_chunk_ops.run_if(on_event::), ) .run_if(in_state(AppState::MainGame)),), + ) + .add_systems( + Update, + (( + handle_update_scene_view.run_if(on_event::), + check_if_should_update_scene, + update_scene.run_if(on_event::), + ) + .chain()) + .run_if(in_state(AppState::MainGame)), ); } } diff --git a/crates/plugins/src/world/mod.rs b/crates/plugins/src/world/mod.rs index 9e01924..52b3a79 100644 --- a/crates/plugins/src/world/mod.rs +++ b/crates/plugins/src/world/mod.rs @@ -64,7 +64,7 @@ impl Plugin for WorldPlugin { .add_event::() .add_systems(OnEnter(AppState::InitializingWorld), setup) .add_systems( - Update, + FixedUpdate, ( events::handle_generate_chunk_request.run_if(on_event::), events::handle_generate_chunk_task