bevy/crates/bevy_ecs/src
Hennadii Chernyshchyk 891c2f1203
Add RemovedComponentEvents::iter (#12815)
# Objective

Sometimes it's useful to iterate over removed entities. For example, in
my library
[bevy_replicon](https://github.com/projectharmonia/bevy_replicon) I need
it to iterate over all removals to replicate them over the network.

Right now we do lookups, but it would be more convenient and faster to
just iterate over all removals.

## Solution

Add `RemovedComponentEvents::iter`.

---

## Changelog

### Added

- `RemovedComponentEvents::iter` to iterate over all removed components.

---------

Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
2024-04-01 20:20:30 +00:00
..
entity Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
identifier fix some typos (#12038) 2024-02-22 18:55:22 +00:00
query Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
reflect Move commands module into bevy::ecs::world (#12234) 2024-03-02 23:13:45 +00:00
schedule Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
storage Use NonMaxUsize for non-component SparseSets (#12083) 2024-03-03 14:55:27 +00:00
system Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
world Added an init_bundle method to World (#12573) 2024-03-24 23:48:51 +00:00
archetype.rs Adding some docs for archetype internals (#12578) 2024-03-23 01:48:31 +00:00
bundle.rs Update safety comment for bundle removal (#12657) 2024-03-23 22:07:08 +00:00
change_detection.rs Implement MutUntyped::from(mut_typed) (#12406) 2024-03-10 12:46:50 +00:00
component.rs Remove ComponentStorage and associated types (#12311) 2024-03-05 15:54:52 +00:00
event.rs Implement Clone for ManualEventReader (#12777) 2024-03-29 14:49:13 +00:00
lib.rs Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
removal_detection.rs Add RemovedComponentEvents::iter (#12815) 2024-04-01 20:20:30 +00:00