bevy/crates
Alice Cecile 3fbe3683d9 Improve debugging tools for change detection (#4160)
# Objective

1. Previously, the `change_tick` and `last_change_tick` fields on `SystemChangeTick` [were `pub`](https://docs.rs/bevy/0.6.1/bevy/ecs/system/struct.SystemChangeTick.html).
   1.  This was actively misleading, as while this can be fetched as a `SystemParam`, a copy is returned instead
2. This information could be useful for debugging, but there was no way to investigate when data was changed.
3. There were no docs!

## Solution

1. Move these to a getter method.
2. Add `last_changed` method to the `DetectChanges` trait to enable inspection of when data was last changed.
3. Add docs.

# Changelog

 `SystemChangeTick` now provides getter methods for the current and previous change tick, rather than public fields.
 This can be combined with `DetectChanges::last_changed()` to debug the timing of changes.

# Migration guide

The `change_tick` and `last_change_tick` fields on `SystemChangeTick` are now private, use the corresponding getter method instead.
2022-05-02 18:26:52 +00:00
..
bevy_animation Make AnimationClip::duration return value instead of reference (#4617) 2022-04-27 23:44:06 +00:00
bevy_app Tidy up PluginGroupBuilder by moving Plugin index retrieval to it's own function (#4446) 2022-05-02 13:20:54 +00:00
bevy_asset Add file metadata to AssetIo (#2123) 2022-05-02 18:04:47 +00:00
bevy_audio Converted exclusive systems to parallel systems wherever possible (#2774) 2022-04-25 14:32:56 +00:00
bevy_core Move float_ord from bevy_core to bevy_utils (#4189) 2022-04-27 18:02:05 +00:00
bevy_core_pipeline Move float_ord from bevy_core to bevy_utils (#4189) 2022-04-27 18:02:05 +00:00
bevy_crevice Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_derive Decouple some dependencies (#3886) 2022-04-27 19:08:11 +00:00
bevy_diagnostic Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_dylib Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_dynamic_plugin Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_ecs Improve debugging tools for change detection (#4160) 2022-05-02 18:26:52 +00:00
bevy_ecs_compile_fail_tests Introduce tests for derive(WorldQuery) (#4625) 2022-04-28 21:06:20 +00:00
bevy_gilrs Change gamepad.rs tuples to normal structs (#4519) 2022-05-02 13:20:55 +00:00
bevy_gltf Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_hierarchy Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_input Change gamepad.rs tuples to normal structs (#4519) 2022-05-02 13:20:55 +00:00
bevy_internal Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_log Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_macro_utils Decouple some dependencies (#3886) 2022-04-27 19:08:11 +00:00
bevy_math Document bevy_math (#4591) 2022-04-26 18:23:29 +00:00
bevy_pbr Rename transparent_phase to opaque_phase in wireframe.rs (#4639) 2022-05-02 04:11:55 +00:00
bevy_reflect bevy_reflect: Add GetTypeRegistration impl for reflected tuples (#4226) 2022-05-02 18:04:48 +00:00
bevy_render Use lifetimed, type erased pointers in bevy_ecs (#3001) 2022-04-27 23:44:06 +00:00
bevy_scene Bump Bevy to 0.8.0-dev (#4505) 2022-04-17 23:04:52 +00:00
bevy_sprite Move float_ord from bevy_core to bevy_utils (#4189) 2022-04-27 18:02:05 +00:00
bevy_tasks Remove unused CountdownEvent (#4290) 2022-04-26 21:20:12 +00:00
bevy_text Move float_ord from bevy_core to bevy_utils (#4189) 2022-04-27 18:02:05 +00:00
bevy_transform Make Transform propagation correct in the presence of updated children (#4608) 2022-05-02 18:04:49 +00:00
bevy_ui Use lifetimed, type erased pointers in bevy_ecs (#3001) 2022-04-27 23:44:06 +00:00
bevy_utils Decouple some dependencies (#3886) 2022-04-27 19:08:11 +00:00
bevy_window Converted exclusive systems to parallel systems wherever possible (#2774) 2022-04-25 14:32:56 +00:00
bevy_winit Add infallible resource getters for WorldCell (#4104) 2022-04-25 23:19:13 +00:00