Skip to content

Support EntityCommands::trigger and EntityWorldMut::trigger #14233

Closed
@benfrankel

Description

@benfrankel

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

Ergonomics.

What solution would you like?

commands.spawn(bundle).trigger(event).insert(bundle2);

What alternative(s) have you considered?

let id = commands.spawn(bundle).id();
commands.trigger_targets(event, id);
commands.entity(id).insert(bundle2);

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-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