Skip to content

Commit

Permalink
Make despawn with descendants public
Browse files Browse the repository at this point in the history
This way, threadlocal systems can despawn hierarchies.
  • Loading branch information
svents committed Nov 21, 2020
1 parent eae0ab1 commit 072c8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_transform/src/hierarchy/hierarchy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct DespawnRecursive {
entity: Entity,
}

fn despawn_with_descendants(world: &mut World, entity: Entity) {
pub fn despawn_with_descendants(world: &mut World, entity: Entity) {
// first, make the entity's own parent forget about it
if let Ok(parent) = world.get::<Parent>(entity).map(|parent| parent.0) {
if let Ok(mut children) = world.get_mut::<Children>(parent) {
Expand Down

0 comments on commit 072c8f6

Please sign in to comment.