How to avoid duplicate event processing across states #12274
-
Is there a way for one system to consume events, so another system won't see them? I'm running into an issue where an event triggers a state change, and both the old an new states process the events. I'd assumed
When I press escape, I see "Pausing" and "Unpausing". |
Beta Was this translation helpful? Give feedback.
Answered by
alice-i-cecile
Mar 3, 2024
Replies: 1 comment
-
Use |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rcorre
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
ResMut<Events<T>>::drain
, which will remove the events from the central storage, rather than just one of the readers.