-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
- 0.6
- 0.7
Code
use bevy::prelude::*;
#[derive(Component)]
struct A;
#[derive(Component)]
struct B;
fn main() {
App::new().add_system(hello_world_system).run();
}
fn hello_world_system(aaas: Query<&A, Added<B>>, bees: Query<&mut B>) {
println!("hello world");
}What should happen
cargo run this should print "hello world". As I never access B in aaas, there should be no conflict between bees and aaas.
What happened instead
thread 'main' panicked at 'error[B0001]: Query<&mut bevy_exclusion_bug::B, ()> in system bevy_exclusion_bug::hello_world_system accesses component(s) bevy_exclusion_bug::B in a way that conflicts with a previous system parameter. Consider using `Without<T>` to create disjoint Queries or merging conflicting Queries into a `ParamSet`.', /home/gibonus/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/bevy_ecs-0.7.0/src/system/system_param.rs:173:5
Additional information
Initially found out by @linkmauve in nicopap/ui-navigation#21. I'm fairly certain the example worked at one point without crashing. I'll investigate further and report here.
Azorlogh
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior