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.