-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add support for or
in ECS querying
#162
Comments
Summing up some conversation from the Discord on this topic:
I'd like to take a stab at implementing the fn my_system(query: &mut Query<(Component1, AnyChanged<(Component2, Component3))> {
for (component1, (component2, component3)) in &mut query.iter() {
// do stuff
if component2.changed {
// do more stuff
}
}
} I'm not sure if adding the |
Some more Discord conversation summary:
|
Sorry I did not see your recent comments, Emily. I tried a solution using directly the should_skip methods of two queries to implement Either<Query1, Query2> |
Even though I really like the tuple approach I outlined, it has a ton of implementation complexity. @BimDav i think your |
Closed by #358 |
In investigating work for #63 it came up that we cannot do an
or
query right now. The specific query I wanted was:A
,B
, andC
It would be nice to be able to use some form of
or
statement when querying.The text was updated successfully, but these errors were encountered: