Open MiniaczQ opened 2 months ago
Trying to perform commands on trigger entity can lead to errors later than expected (command execution instead of call site).
While Entity::PLACEHOLDER works great for the internals, the users should be presented with the standard two methods:
Entity::PLACEHOLDER
entity()
get_entity()
This requires a breaking change on entity() which currently never panics, but can return Entity::PLACEHOLDER.
Check for placeholder by oneself.
In the vein of https://github.com/bevyengine/bevy/pull/14268, maybe there should only be a get_entity() and no entity()
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 noneThis requires a breaking change on
entity()
which currently never panics, but can returnEntity::PLACEHOLDER
.What alternative(s) have you considered?
Check for placeholder by oneself.