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
@ -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 New Issue
Block a user