Skip to content

Support .run_if() on observers #14195

@forbjok

Description

@forbjok

What problem does this solve or what need does it fill?

Just like with systems, sometimes observers are only relevant for a specific state. It would be much more convenient to be able to do this on observers using .run_if() or something similar, than having to manually check the state in the function code.

What solution would you like?

To be able to use .run_if() on observers to limit when they will run, just like on regular systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions