diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index eab6c01a051d0..4502ee93b0c9c 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -449,6 +449,9 @@ impl World { /// assert_eq!(position.x, 2.0); /// ``` pub fn spawn(&mut self, bundle: B) -> EntityMut { + if std::any::TypeId::of::() == std::any::TypeId::of::<()>() { + return self.spawn_empty(); + } self.flush(); let entity = self.entities.alloc(); let entity_location = {