@@ 130,13 130,3 @@ pub fn despawn_screen<T: Component>(to_despawn: Query<Entity, With<T>>, mut comm
commands.entity(entity).despawn_recursive();
}
}
-
-/// Utility function to remove UI nodes, which is usually just one node
-/// NOTE: So, UI shows up as just nodes that don't have parents, so this
-/// works mighty fine, at least for now.
-/// MAY break something in the future, but that's why this note is here.
-pub fn remove_ui(mut commands: Commands, nodes: Query<Entity, (With<Node>, Without<Parent>)>) {
- for node in &nodes {
- commands.entity(node).despawn_recursive();
- }
-}