bevy/crates/bevy_ecs/src
Nicola Papale f07bb3c449
Add last_changed_tick and added_tick to ComponentTicks (#8803)
# Objective

EntityRef::get_change_ticks mentions that ComponentTicks is useful to
create change detection for your own runtime.

However, ComponentTicks doesn't even expose enough data to create
something that implements DetectChanges. Specifically, we need to be
able to extract the last change tick.

## Solution

We add a method to get the last change tick. We also add a method to get
the added tick.

## Changelog

- Add `last_changed_tick` and `added_tick` to `ComponentTicks`
2023-06-12 17:55:09 +00:00
..
entity Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
query Add iter_many_manual QueryState method (#8772) 2023-06-10 23:24:09 +00:00
schedule Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
storage Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
system Rename Command's "write" method to "apply" (#8814) 2023-06-12 17:53:47 +00:00
world Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
archetype.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
bundle.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
change_detection.rs Allow unsized types as mapped value in Ref::map (#8817) 2023-06-12 17:52:11 +00:00
component.rs Add last_changed_tick and added_tick to ComponentTicks (#8803) 2023-06-12 17:55:09 +00:00
event.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
lib.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
reflect.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00
removal_detection.rs Document every public item in bevy_ecs (#8731) 2023-06-10 23:23:48 +00:00