diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index 314bea0d4d82b..661ef2ddd5813 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -1111,7 +1111,10 @@ impl World { }, }; let result = f(self, value_mut); - assert!(!self.contains_resource::()); + assert!(!self.contains_resource::(), + "Resource `{}` was inserted during a call to World::resource_scope.\n\ + This is not allowed as the original resource is reinserted to the world after the FnOnce param is invoked.", + std::any::type_name::()); let resource_archetype = self.archetypes.resource_mut(); let unique_components = resource_archetype.unique_components_mut();