You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://bevy-cheatbook.github.io/programming/events.html, it was unclear to me that I also needed to trigger the event (e.g. using an Update or FixedUpdate), my silly assumption was that Bevy would automatically know if the EventReader<T> has been filled if an EventWriter<T> sends one and that it doesn't need periodic running. (and that it was handled with app.add_event::<>(); and the reading functions somehow magically discovered.)
In https://bevy-cheatbook.github.io/programming/events.html, it was unclear to me that I also needed to trigger the event (e.g. using an
Update
orFixedUpdate
), my silly assumption was that Bevy would automatically know if theEventReader<T>
has been filled if anEventWriter<T>
sends one and that it doesn't need periodic running. (and that it was handled withapp.add_event::<>();
and the reading functions somehow magically discovered.)For it to click for me, I had to refer to the official example (https://github.com/bevyengine/bevy/blob/v0.13.0/examples/ecs/event.rs) which registers the function too as a system.
While it is written in the "usage advice", it kind of flew over my head.
I'd suggest a simple enhancement here
bevy-cheatbook/src/programming/events.md
Lines 29 to 33 in fdf50e4
to the sorts of something like this:
I love the book, it's been super helpful :) this is the only pitfall I fell into so far.
The text was updated successfully, but these errors were encountered: