[Merged by Bors] - Add set_parent and remove_parent to EntityCommands#6189
Closed
tim-blackbird wants to merge 1 commit intobevyengine:mainfrom
Closed
[Merged by Bors] - Add set_parent and remove_parent to EntityCommands#6189tim-blackbird wants to merge 1 commit intobevyengine:mainfrom
set_parent and remove_parent to EntityCommands#6189tim-blackbird wants to merge 1 commit intobevyengine:mainfrom
Conversation
alice-i-cecile
approved these changes
Oct 7, 2022
Contributor
|
What is the value of creating a new |
Contributor
Author
|
Your comment made me realize that |
james7132
approved these changes
Oct 19, 2022
mockersf
approved these changes
Oct 19, 2022
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Oct 24, 2022
I found myself doing ```rust let child = commands.spawn(..).id(); commands.entity(parent).add_child(child); ``` When that could just be ```rust commands.spawn(..).set_parent(parent); ``` Adding `set_parent` was trivial as it's just an `AddChild` command. Most of the changes are for `remove_parent`. Also updated some outdated docs. Co-authored-by: devil-ira <justthecooldude@gmail.com>
Contributor
|
Build failed (retrying...): |
bors bot
pushed a commit
that referenced
this pull request
Oct 24, 2022
I found myself doing ```rust let child = commands.spawn(..).id(); commands.entity(parent).add_child(child); ``` When that could just be ```rust commands.spawn(..).set_parent(parent); ``` Adding `set_parent` was trivial as it's just an `AddChild` command. Most of the changes are for `remove_parent`. Also updated some outdated docs. Co-authored-by: devil-ira <justthecooldude@gmail.com>
Contributor
set_parent and remove_parent to EntityCommandsset_parent and remove_parent to EntityCommands
james7132
pushed a commit
to james7132/bevy
that referenced
this pull request
Oct 28, 2022
…6189) I found myself doing ```rust let child = commands.spawn(..).id(); commands.entity(parent).add_child(child); ``` When that could just be ```rust commands.spawn(..).set_parent(parent); ``` Adding `set_parent` was trivial as it's just an `AddChild` command. Most of the changes are for `remove_parent`. Also updated some outdated docs. Co-authored-by: devil-ira <justthecooldude@gmail.com>
Pietrek14
pushed a commit
to Pietrek14/bevy
that referenced
this pull request
Dec 17, 2022
…6189) I found myself doing ```rust let child = commands.spawn(..).id(); commands.entity(parent).add_child(child); ``` When that could just be ```rust commands.spawn(..).set_parent(parent); ``` Adding `set_parent` was trivial as it's just an `AddChild` command. Most of the changes are for `remove_parent`. Also updated some outdated docs. Co-authored-by: devil-ira <justthecooldude@gmail.com>
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Feb 1, 2023
…6189) I found myself doing ```rust let child = commands.spawn(..).id(); commands.entity(parent).add_child(child); ``` When that could just be ```rust commands.spawn(..).set_parent(parent); ``` Adding `set_parent` was trivial as it's just an `AddChild` command. Most of the changes are for `remove_parent`. Also updated some outdated docs. Co-authored-by: devil-ira <justthecooldude@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found myself doing
When that could just be
Adding
set_parentwas trivial as it's just anAddChildcommand. Most of the changes are forremove_parent.Also updated some outdated docs.