#Observer ordering

1 messages · Page 1 of 1 (latest)

royal tulip
#

When using Events, it's possible to have multiple systems responding to the same events in a particular order. When using observers, I don't see a way to achieve this. When making a cascade of effects following an event that targets a particular entity, would it be more sensible to use ordinary Events with an entity field, or use a chain of observers that trigger one another?

molten crest
#

you can trigger and observer from another observer, yes

blissful gazelle
#

I have achieved that by adding the .chain() in the system update.

I think I found that on the unofficial documentation for bevy.

#

Something like:
System 1: write
System 2: write
System 3: read.

In the end:
app.add_system(Update, (system1, system2, system3).chain())