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

Remove add_children uses #178

Closed
wants to merge 4 commits into from
Closed

Conversation

luca-della-vedova
Copy link
Member

New feature implementation

Implemented feature

Remove all uses of add_children throughout the codebase.

Implementation description

In preparation for the upgrade to bevy 0.11, the add_children function was removed. This PR refactors the code to remove all uses to make migration easier without breaking the code (yet!). Two main cases were encountered:

  • Cases in which the return value was actually ignored, a simple add_children -> with_children change works.
  • Cases in which the return value was used, usually to spawn entities and return their id, remove the add_children, spawn all the entities and manually add them through either add_child or set_parent, depending on the case.

Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
Signed-off-by: Luca Della Vedova <lucadv@intrinsic.ai>
@luca-della-vedova
Copy link
Member Author

At this point it's probably easier to just work on #180 instead, closing this

@luca-della-vedova luca-della-vedova deleted the luca/add_children_refactor branch November 7, 2023 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant