-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add a doc note about despawn footgun #10889
Conversation
3c46ad4
to
ad4932d
Compare
I'm not in favor of adding notes about other crates that are not dependencies. I would avoid being too specific and instead just note that despawning an entity won't have side effects on other entities (until we have relations). If a user knows how to use EDIT: Further thoughts: IMO |
Makes sense. Renaming things can be in a different PR. I updated the notes to remove specific references to items in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Do you want to document despawn_recursive
in children addition methods in bevy_hierarchy
on this PR, or do you want to leave it as future work?
I'll leave it as future work. |
I furtherly addressed the despawn footgun in the |
Objective
The
Despawn
command breaks the hierarchy whenever you use it if the despawned entity has a parent or any children. This is a serious footgun because theDespawn
command has the shortest name, the behavior is unexpected and not likely to be what you want, and the crash that it causes can be very difficult to track down.Solution
Until this can be fixed by relations, add a note mentioning the footgun in the documentation.