-
-
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
Observed entity query data fetching: Trigger<FooEvent, (), (&mut Foo, &Bar)>
#15698
base: main
Are you sure you want to change the base?
Conversation
// SAFETY: Delegate to other `System` implementations. | ||
unsafe { self.a.validate_param_unsafe(world) && self.b.validate_param_unsafe(world) } | ||
unsafe { | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO. Unsure how to handle validating the second system.
fn validate_param(&mut self, world: &World) -> bool { | ||
self.a.validate_param(world) && self.b.validate_param(world) | ||
fn validate_param(&mut self, input: &SystemIn<'_, Self>, world: &World) -> bool { | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO. Unsure how to handle validating the second system.
@@ -88,7 +88,7 @@ use super::{IntoSystem, ReadOnlySystem, System}; | |||
label = "invalid system combination", | |||
note = "the inputs and outputs of `{A}` and `{B}` are not compatible with this combiner" | |||
)] | |||
pub trait Combine<A: System, B: System> { | |||
pub trait Combine<A: System<In = Self::In>, B: System<In = Self::In>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a breaking change? It will force the two systems to have the same input type, so e.g. piping would no longer be implementable this way (not that bevy
's implementation used Combine
).
Appears to implement #15653. |
Objective
Solution
Adds a new type parameter
D: QueryData
toTrigger<E, B, D>
.Testing
Showcase
While a showcase should aim to be brief and digestible, you can use a toggleable section to save space on longer showcases:
Click to view showcase
Migration Guide