Skip to content

Commit ac7f9b0

Browse files
committed
Completely skip all the hot-reloading polling if hot-reloading is disabled.
1 parent 7d84e5b commit ac7f9b0

File tree

1 file changed

+6
-0
lines changed
  • crates/bevy_asset/src/server

1 file changed

+6
-0
lines changed

crates/bevy_asset/src/server/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,12 @@ pub fn handle_internal_asset_events(world: &mut World) {
17751775
world.write_message_batch(untyped_failures);
17761776
}
17771777

1778+
// The following code all deals with hot-reloading, which we can skip if the server isn't
1779+
// watching for changes.
1780+
if !infos.watching_for_changes {
1781+
return;
1782+
}
1783+
17781784
fn queue_ancestors(
17791785
asset_path: &AssetPath,
17801786
infos: &AssetInfos,

0 commit comments

Comments
 (0)