Open
Description
What problem does this solve or what need does it fill?
Trying to perform commands on trigger entity can lead to errors later than expected (command execution instead of call site).
What solution would you like?
While Entity::PLACEHOLDER
works great for the internals, the users should be presented with the standard two methods:
entity()
- get a valid entity or panicget_entity()
- get a valid entity or none
This requires a breaking change on entity()
which currently never panics, but can return Entity::PLACEHOLDER
.
What alternative(s) have you considered?
Check for placeholder by oneself.
Metadata
Metadata
Assignees
Labels
Entities, components, systems, and eventsA targeted quality-of-life change that makes Bevy easier to useA "normal" level of difficulty; suitable for simple features or challenging fixesThis issue is ready for an implementation PR. Go for it!There are nontrivial implications that should be thought through