Bevy version
bevy main
What you did
When inserting the resource removed in resource_scope during the callback
use bevy_ecs::prelude::*;
struct Resource {}
fn main() {
let mut world = World::new();
world.insert_resource(Resource {});
world.resource_scope(|world, _res: Mut<Resource>| {
world.insert_resource(Resource {});
});
}
bevy panics with an unhelpful message of
thread 'main' panicked at 'assertion failed: !self.contains_resource::<R>()', /home/jakob/.cargo/registry/src/index.crates.io-e139d0d48fed7772/bevy_ecs-0.7.0/src/world/mod.rs:1072:9
What went wrong
It would be nice to show more information, something like resource repro::Resource was inserted during call to resource_scope, which is not allowed because ....
Bevy version
bevy
mainWhat you did
When inserting the resource removed in
resource_scopeduring the callbackbevy panics with an unhelpful message of
What went wrong
It would be nice to show more information, something like
resource repro::Resource was inserted during call to resource_scope, which is not allowed because ....