From 10f11babc8a5d0a852f2928410b131f919274237 Mon Sep 17 00:00:00 2001 From: Elliott Pierce Date: Mon, 23 Jun 2025 11:06:33 -0400 Subject: [PATCH] make the new `entity_count` more precise --- crates/bevy_ecs/src/world/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index 5d6dfb3d07..c14503786d 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -224,7 +224,7 @@ impl World { /// This is helpful as a diagnostic, but it can also be used effectively in tests. #[inline] pub fn entity_count(&self) -> u32 { - self.entities.len() + self.entities.count_constructed() } /// Retrieves this world's [`Archetypes`] collection.