panic: Resource WorldInspectorParams was inserted during a call to World::resource_scope
SET001 opened this issue · comments
Kostiantyn Kostiuk commented
Not sure if this issue is related to bevy_editor_pls itself, to bevy-inspector-egui or maybe I'm doing something wrong.
The issue is that as soon as I'm trying to expand one of my components in ispector, the app crashes with panic:
thread 'main' panicked at 'Resource `bevy_inspector_egui::world_inspector::WorldInspectorParams` was inserted during a call to World::resource_scope.
This is not allowed as the original resource is reinserted to the world after the FnOnce param is invoked.', /home/set/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.9.1/src/world/mod.rs:1203:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Finished running. Exit status: 101]
the component is:
#[derive(Component, Default, Clone, Copy, Debug, PartialEq, Reflect, FromReflect)]
pub struct ChunkTileIndex{
pub chunk: IVec2,
pub tile: IVec2
}
#[derive(Component, Default, Clone, Debug, Reflect, PartialEq)]
#[reflect(Component)]
pub struct PositionOnTilemap{
pub position: Option<ChunkTileIndex>,
pub current_tiles: Vec<Entity>
}