//! This example demonstrates how to use the plugin with bevy_ui. use bevy::{ecs::system::EntityCommands, prelude::*}; use bevy_mod_picking::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins.set(low_latency_window_plugin())) .add_plugins(DefaultPickingPlugins) .add_systems(Startup, (setup_3d, setup_ui).chain()) .add_systems(Update, (update_button_colors, set_camera_viewports)) .insert_resource(UiScale(1.5)) .insert_resource(DebugPickingMode::Normal) .run(); } /// Use the [`PickingInteraction`] state of each button to update its color. fn update_button_colors( mut buttons: Query<(Option<&PickingInteraction>, &mut BackgroundColor), With