-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add commands() method to ChildBuilder #2817
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 commands() method to ChildBuilder #2817
Conversation
d3dffb5
to
310d6be
Compare
#2448 was a previous PR attempt to add this method. |
You are right, I'm sorry I should have checked the PRs if someone had tried to do something similar. In my case I have a function that accepts a |
Closing in favor of #4708. |
# Objective Support returning data out of with_children to enable the use case of changing the parent commands with data created inside the child builder. ## Solution Change the with_children closure to return T. Closes #2817. --- ## Changelog `BuildChildren::add_children` was added with the ability to return data to use outside the closure (for spawning a new child builder on a returned entity for example).
# Objective Support returning data out of with_children to enable the use case of changing the parent commands with data created inside the child builder. ## Solution Change the with_children closure to return T. Closes bevyengine#2817. --- ## Changelog `BuildChildren::add_children` was added with the ability to return data to use outside the closure (for spawning a new child builder on a returned entity for example).
# Objective Support returning data out of with_children to enable the use case of changing the parent commands with data created inside the child builder. ## Solution Change the with_children closure to return T. Closes bevyengine#2817. --- ## Changelog `BuildChildren::add_children` was added with the ability to return data to use outside the closure (for spawning a new child builder on a returned entity for example).
Objective
Commands
structure while constructing child entitiesSolution
Commands
through acommands
method onChuildBuilder
in a similar fashion toEntityCommands