Utility function
(to_despawn: Query<Entity, With<T>>, mut commands: Commands)
| 2 | |
| 3 | // Utility function |
| 4 | pub fn despawn_all<T: Component>(to_despawn: Query<Entity, With<T>>, mut commands: Commands) { |
| 5 | for entity in &to_despawn { |
| 6 | commands.entity(entity).despawn(); |
| 7 | } |
| 8 | } |
nothing calls this directly
no outgoing calls
no test coverage detected