Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: Resource WorldInspectorParams was inserted during a call to World::resource_scope #48

Open
SET001 opened this issue Dec 1, 2022 · 0 comments

Comments

@SET001
Copy link

SET001 commented Dec 1, 2022

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>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant