Skip to content

Observe and WindowResized #14589

Answered by Jondolf
Naarakah asked this question in Q&A
Aug 2, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Buffered events (using EventReader/EventWriter) are currently treated separately from observer events. So my_event_writer.send(event) adds buffered events that can only be read by an EventReader, not observers. WindowResized is a buffered event like this, and can not be listened to by observers.

I believe there are some plans to further unify buffered events and observers in some way, and to make the API slightly clearer / less footgunny, but I don't remember details of what it'll look like.

Also see Observer docs: https://docs.rs/bevy_ecs/latest/bevy_ecs/observer/struct.Observer.html

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Naarakah
Comment options

Answer selected by Naarakah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants