bevyengine / bevyengine/bevy

Access to Observer's EntityCommands in every registration method

Open
#14,205 0 comments 1 reaction 0 assignees View on GitHub
A-ECS C-Feature S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

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

It's hard to differentiate registered observers, it'd be good if they could be named using the `Name` component.

## What solution would you like?

Give access to `EntityCommands` so additional components can be added to observers.

API discussion: https://discord.com/channels/691052431525675048/749335865876021248/1259537484099096657

It should something like
```rs
commands
.entity(my_entity)
.observe(reaction)
.with(|entity_commands| {
entity_commands.insert(Name::new("My entity reaction"));
});
```

## What alternative(s) have you considered?

None came to mind

## Additional context

From https://discord.com/channels/691052431525675048/749335865876021248/1259531576144953365

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.