mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 10:03:07 +00:00
9dd8fbc570
# Objective - Fixes #7066 ## Solution - Split the ChangeDetection trait into ChangeDetection and ChangeDetectionMut - Added Ref as equivalent to &T with change detection --- ## Changelog - Support for Ref which allow inspecting change detection flags in an immutable way ## Migration Guide - While bevy prelude includes both ChangeDetection and ChangeDetectionMut any code explicitly referencing ChangeDetection might need to be updated to ChangeDetectionMut or both. Specifically any reading logic requires ChangeDetection while writes requires ChangeDetectionMut. use bevy_ecs::change_detection::DetectChanges -> use bevy_ecs::change_detection::{DetectChanges, DetectChangesMut} - Previously Res had methods to access change detection `is_changed` and `is_added` those methods have been moved to the `DetectChanges` trait. If you are including bevy prelude you will have access to these types otherwise you will need to `use bevy_ecs::change_detection::DetectChanges` to continue using them. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |