From 3015cac1fe93a3e8b14f62368d5cdd26a2c4475f Mon Sep 17 00:00:00 2001 From: Oliver Nordbjerg Date: Sat, 12 Jul 2025 17:29:06 +0200 Subject: [PATCH] fix: apply max history length --- .../bevy_diagnostic/src/entity_count_diagnostics_plugin.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/bevy_diagnostic/src/entity_count_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/entity_count_diagnostics_plugin.rs index 8a1754a43d..1de4f4c029 100644 --- a/crates/bevy_diagnostic/src/entity_count_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/entity_count_diagnostics_plugin.rs @@ -30,8 +30,10 @@ impl EntityCountDiagnosticsPlugin { impl Plugin for EntityCountDiagnosticsPlugin { fn build(&self, app: &mut App) { - app.register_diagnostic(Diagnostic::new(Self::ENTITY_COUNT)) - .add_systems(Update, Self::diagnostic_system); + app.register_diagnostic( + Diagnostic::new(Self::ENTITY_COUNT).with_max_history_length(self.max_history_length), + ) + .add_systems(Update, Self::diagnostic_system); } }