-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I think this is more likely to be an issue with |
Beta Was this translation helpful? Give feedback.
-
|
When you despawn the entities with the Consider calling for p_entity in &query {
- commands.entity(p_entity).despawn();
+ commands.entity(p_entity).clear_children().despawn();
} |
Beta Was this translation helpful? Give feedback.

When you despawn the entities with the
Pcomponent you don't fixup theParentcomponent of their children, which remains there pointing now invalid entities. Thenbevy_inspector_eguishows only entities without aParentcomponent, which filters out your entities with aCcomponent.Consider calling
.clear_children()before.despawn():for p_entity in &query { - commands.entity(p_entity).despawn(); + commands.entity(p_entity).clear_children().despawn(); }