Skip to content

Support reflected event types for Observer triggers. #17511

Open
@ItsDoot

Description

@ItsDoot

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

We don't currently support this as a safe alternative to #17509. Users might find this useful.

What solution would you like?

In a similar manner to #17509, we provide a ReflectedEvent event type for use in a Trigger:

fn my_observer(trigger: Trigger<ReflectedEvent>, /* ... */) {
    /* ... */
}

We would provide a type function to map ReflectedEvent into &dyn Reflect for Trigger::event() and &mut dyn Reflect for Trigger::event_mut().

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsA-ReflectionRuntime information about typesC-FeatureA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesS-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