//! This example illustrates how to react to component change. use bevy::{ecs::world::Ref, prelude::*}; use rand::Rng; fn main() { App::new() .add_plugins(DefaultPlugins) .add_systems(( setup.on_startup(), change_component, change_detection, tracker_monitoring, )) .run(); } #[derive(Component, PartialEq, Debug)] struct MyComponent(f32); fn setup(mut commands: Commands) { commands.spawn(MyComponent(0.)); commands.spawn(Transform::IDENTITY); } fn change_component(time: Res