Skip to content

Macro for spawning related entities can't be used with SpawnableList #20455

@Shatur

Description

@Shatur

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

The children! macro is convenient, but it can’t be used with SpawnableLists. So if I need to use SpawnWith or SpawnIter, I have to fall back to Children::spawn, which isn’t very ergonomic.\

This design affects other crates too. For example, in BEI, the only way to represent presets is by using SpawnableList - and those can't be used with the related macro either:

  Bindings::spawn((Spawn(Binding::mouse_motion()), Axial::right_stick()))

What solution would you like?

The perfect solution would be to either adjust the macro or somehow change the design to avoid requiring the use of Spawn for RelationshipTarget::spawn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-MacrosCode that generates Rust codeS-Needs-DesignThis issue requires design work to think about how it would best be accomplished

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions