mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix hierarchy example panic (#3378)
# Objective Fixes #3321 ## Solution Uses `despawn_recursive()` instead of `despawn()` when removing children.
This commit is contained in:
parent
340957994d
commit
46c1480f42
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ fn rotate(
|
|||
// seconds
|
||||
if time.seconds_since_startup() >= 2.0 && children.len() == 3 {
|
||||
let child = children.last().copied().unwrap();
|
||||
commands.entity(child).despawn();
|
||||
commands.entity(child).despawn_recursive();
|
||||
}
|
||||
|
||||
if time.seconds_since_startup() >= 4.0 {
|
||||
|
|
Loading…
Reference in a new issue