MCPcopy Create free account
hub / github.com/LarsDu/StarRust / despawn_all

Function despawn_all

src/utils.rs:4–8  ·  view source on GitHub ↗

Utility function

(to_despawn: Query<Entity, With<T>>, mut commands: Commands)

Source from the content-addressed store, hash-verified

2
3// Utility function
4pub 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected