Skip to content

Event Reflection #18511

Open
Open
@makspll

Description

@makspll

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

Support/Enforce reflection for events.

Otherwise the only way to dynamically interact with these things, is to manually register every event you'd want your app to interact with through the type registry yourself, but not all of them will implement reflection.

What solution would you like?

  • App::add_event should bound T: Reflect and register the involved types with the type registry (Events<T>, T, etc..).
    OR
  • have #[derive(Event)]#[event(Reflect)] (or just a special ReflectEvent type data) macro functionality and implement it around bevy (less stringent, but also less likely to be useful).
    OR
  • Implement a sort of sub-genre of reflection specifically for events (only require ability to construct them, find them by name etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsA-ReflectionRuntime information about typesC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesS-Needs-SMEDecision or review from an SME is requiredX-ContentiousThere are nontrivial implications that should be thought through

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions