For 0.17 the internals of Event changed to have an associated type Trigger. If I try to trigger a generic Event like so:
fn generic_system<T: Event>(mut commands: Commands, query: Query<&Something<T>>)
{
for event in &query {
commands.trigger(event);
}
}
I am running into this issue:
the trait bound `<T as bevy::prelude::Event>::Trigger<'_>: std::default::Default` is not satisfied
And with the suggestion I am not so sure what to do with the lifetime. All things I did not have to worry too much until now :D.
This is the real world usecase https://github.com/KirmesBude/bevy_trickfilm/pull/49