Add the ability to cancel delayed commands
- 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?
When using delayed commands for things like animations, sound effects or gameplay effects,
you'll often want to *stop* the command from taking effect if the originating entity dies.
## What solution would you like?
Expose the entity reference of the delayed command tracking entity somehow during delayed command creation.
## What alternative(s) have you considered?
Current workaround: query DelayedCommandQueue, despawn what you want cancelled.
Alternatively, embed the orginating entity in the delayed command, and check during application that the entity still exists.
## Additional context
Noticed when writing the release notes for Bevy 0.19 :)
Contributor guide
Assessment
This issue has not been assessed yet.