pub fn teardown_except_cameras(mut commands: Commands, entities: Query<Entity, Without<Camera>>) {
    for entity in entities.iter() {
        commands.entity(entity).despawn_recursive();
    }
}
/// Despawn all entities except for cameras
Despawn all entities except for cameras
Despawn all entities except for cameras
pub fn teardown_except_cameras(mut commands: Commands, entities: Query<Entity, Without<Camera>>) {
    for entity in entities.iter() {
        commands.entity(entity).despawn_recursive();
    }
}
pub fn teardown_except_cameras ( mut commands : Commands , entities : Query < Entity , Without < Camera > > ) { for entity in entities . iter ( ) { commands . entity ( entity ) . despawn_recursive ( ) ; } }
Despawn all entities except for cameras
Despawn all entities except for cameras
commands
Commands
entities
Query<Entity, Without<Camera>>
commands
Commands
entities
Query<Entity, Without<Camera>>