Skip to content

Document how propagate(false) works #19648

Open
@viridia

Description

@viridia

How can Bevy's documentation be improved?

In the docs for propagate, please explain that when propagation is stopped, observers will continue to trigger for that target entity, and only the observers for ancestor entities are affected. This is true for both per-entity and global observers.

Something like this:

Calling propagate(false) from within an observer callback will prevent the event from triggering along the chain of related entities, but will not inhibit the triggering of other observers on the same entity. This is true for both global and per-entity observers: once an observer is triggered for a given target entity, all matching observers will be triggered for that target, although the order of firing is unspecified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-DocsAn addition or correction to our documentationD-TrivialNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    Status

    Observer overhaul

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions