/// Cleans up the 3D scene by despawning its components
Cleans up the 3D scene by despawning its components
Cleans up the 3D scene by despawning its components
fn cleanup_camera(
    mut commands: Commands,
    query: Query<Entity, Or<(With<OrbitCamera>, With<GameLight>)>>,
) {
    for entity in query.iter() {
        commands.entity(entity).despawn_recursive();
    }
}
fn cleanup_camera ( mut commands : Commands , query : Query < Entity , Or < ( With < OrbitCamera > , With < GameLight > ) > > , ) { for entity in query . iter ( ) { commands . entity ( entity ) . despawn_recursive ( ) ; } }
Cleans up the 3D scene by despawning its components
Cleans up the 3D scene by despawning its components
commands
Commands
query
Query<Entity, Or<(With<OrbitCamera>, With<GameLight>)>>