Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't panic when despawning entity multiple times #649

Merged
merged 2 commits into from
Oct 8, 2020
Merged

Don't panic when despawning entity multiple times #649

merged 2 commits into from
Oct 8, 2020

Conversation

CleanCut
Copy link
Member

@CleanCut CleanCut commented Oct 8, 2020

Emit a debug log message instead of a panic when despawning an entity which has already been despawned.

Is this the right approach? Are there other ways to despawn that need to be addressed?

Resolves #487

@cart cart merged commit bf501b7 into bevyengine:master Oct 8, 2020
@cart
Copy link
Member

cart commented Oct 8, 2020

I definitely like this. We should probably do the same for despawn_recursive. Specifically despawn_with_children_recursive_inner

@CleanCut
Copy link
Member Author

CleanCut commented Oct 9, 2020

@cart I should have remembered about despawn_with_children_recursive_inner, given I touched it not too long ago! I pushed up a change for it as well.

@CleanCut CleanCut mentioned this pull request Oct 9, 2020
@karroffel karroffel added P-Crash A sudden unexpected crash A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change labels Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commands double (or more) despawn and NoSuchEntity Error.
3 participants