StateScoped entity could cause "Could not despawn entity" warning #15212
Labels
A-States
App-level states machines
C-Bug
An unexpected or incorrect behavior
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Needs-Design
This issue requires design work to think about how it would best be accomplished
Bevy version
v0.14.2
What you did
I spawned an entity with
StateScoped(MyState)
component and a children withStateScoped(MySubState)
component.What went wrong
If I exit
MyState
, both entities will first be despawned byStateScoped(MyState)
(due to recursive despawn), and then the child entity will also be attempted to be despawned byStateScoped(MySubState)
. It causes warning:I think that the warning shouldn't be emitted in this case.
The text was updated successfully, but these errors were encountered: