![]() # Objective - Add `remove_by_id` method to `EntityWorldMut` and `EntityCommands` - This is a duplicate of the awesome work by @mateuseap, last updated 04/09/23 - #9663 - I'm opening a second one to ensure the feature makes it into `0.14` - Fixes #9261 ## Solution Almost identical to #9663 with three exceptions - Uses a closure instead of struct for commands, consistent with other similar commands - Does not refactor `EntityCommands::insert`, so no migration guide - `EntityWorldMut::remove_by_id` is now safe containing unsafe blocks, I think thats what @SkiFire13 was indicating should happen [in this comment](https://github.com/bevyengine/bevy/pull/9663#discussion_r1314307525) ## Changelog - Added `EntityWorldMut::remove_by_id` method and its tests. - Added `EntityCommands::remove_by_id` method and its tests. --------- Co-authored-by: James Liu <contact@jamessliu.com> |
||
---|---|---|
.. | ||
entity | ||
identifier | ||
query | ||
reflect | ||
schedule | ||
storage | ||
system | ||
world | ||
archetype.rs | ||
bundle.rs | ||
change_detection.rs | ||
component.rs | ||
event.rs | ||
lib.rs | ||
removal_detection.rs |