Get single entity from query ## Example Before using Single: ```rust use bevy::prelude::*; #[derive(Component)] struct Player; pub fn snap_camera( players: Query<&Transform, With>, mut cameras: Query<&mut Transform, (With, Without)>, ) { let player = players.single(); let mut camera = cameras.single_mut(); camera.translation = player.translation.xy().extend(100.0); } ``` After using Single: ```rust use bevy::prelude::*; use bevy_single::prelude::*; #[derive(Component)] struct Player; pub fn snap_camera( player: Single<&Transform, With>, mut camera: Single<&mut Transform, (With, Without)>, ) { camera.translation = player.translation.xy().extend(100.0); } ``` Or like this: ```rust use bevy::prelude::*; use bevy_single::prelude::*; #[derive(Component)] struct Player; pub fn snap_camera( Single(player): Single<&Transform, With>, Single(mut camera): Single<&mut Transform, (With, Without)>, ) { camera.translation = player.translation.xy().extend(100.0); } ``` ## Example with multiple components Before using Single: ```rust use bevy::prelude::*; use bevy_rapier2d::prelude::*; #[derive(Component)] struct Player; pub fn move_with_wasd( mut players: Query<(&mut KinematicCharacterController, &Player)>, input: Res>, time: Res