bevy/crates/bevy_render/src
Joshua Chapman 9dd8fbc570 Added Ref to allow immutable access with change detection (#7097)
# 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.
2023-01-11 15:41:54 +00:00
..
camera Fix various typos (#7096) 2023-01-06 00:43:30 +00:00
color Add a more familiar hex color entry (#7060) 2023-01-04 23:40:42 +00:00
mesh Update Box vertices comment (#7055) 2022-12-29 23:45:07 +00:00
primitives Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_graph Replace UUID based IDs with a atomic-counted ones (#6988) 2022-12-25 00:23:15 +00:00
render_phase Reduce branching in TrackedRenderPass (#7053) 2023-01-09 19:24:56 +00:00
render_resource Reduce branching in TrackedRenderPass (#7053) 2023-01-09 19:24:56 +00:00
renderer Reduce branching in TrackedRenderPass (#7053) 2023-01-09 19:24:56 +00:00
texture Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
view Fix beta clippy lints (#7154) 2023-01-11 09:51:22 +00:00
extract_component.rs ExtractComponent output optional associated type (#6699) 2022-11-21 13:19:44 +00:00
extract_param.rs Remove the SystemParamState trait and remove types like ResState (#6919) 2023-01-07 23:20:32 +00:00
extract_resource.rs Added Ref to allow immutable access with change detection (#7097) 2023-01-11 15:41:54 +00:00
globals.rs bevy_reflect: Register missing reflected types for bevy_render (#6725) 2022-11-23 00:41:21 +00:00
lib.rs Separate Extract from Sub App Schedule (#7046) 2023-01-09 19:24:54 +00:00
rangefinder.rs Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_asset.rs Fix clippy::iter_with_drain (#6485) 2022-11-06 01:42:15 +00:00
settings.rs Replace WgpuAdapterInfo with RenderAdapterInfo in the documentation. (#7036) 2022-12-26 19:47:01 +00:00
spatial_bundle.rs enum Visibility component (#6320) 2022-12-25 00:39:29 +00:00