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

Move bevy_hierarchy back into bevy_ecs #15308

Open
alice-i-cecile opened this issue Sep 19, 2024 · 1 comment
Open

Move bevy_hierarchy back into bevy_ecs #15308

alice-i-cecile opened this issue Sep 19, 2024 · 1 comment
Labels
A-ECS Entities, components, systems, and events A-Hierarchy Parent-child entity hierarchies C-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers

Comments

@alice-i-cecile
Copy link
Member

What problem does this solve or what need does it fill?

bevy_hierarchy is in an uncomfortable place: technically existing outside of bevy_ecs, but in practice generally privileged by the ecosystem.

One day (🥺), #3742 will replace bevy_hierarchy completely, allowing for generalized relations in a more robust fashion. This needs to be part of bevy_ecs, so bevy_hierarchy's days are numbered.

What solution would you like?

  1. Move the core parent-child components and logic to bevy_ecs.
  2. Feature flag this under an on-by-default hierarchy flag.
  3. Move any transform propagation logic to bevy_transform.
  4. Move any visibility propagation logic to bevy_render.

As follow-up, consider changing the default despawn behavior to act recursively.

What alternative(s) have you considered?

We could leave this alone, but this is causing problems when trying to tackle how #11090 interacts with hierarchies.

Additional context

Desired by @mockersf (maintainer), @maniwani (SME-ECS) and myself (SME-ECS and maintainer).

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide A-Hierarchy Parent-child entity hierarchies X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Sep 19, 2024
@mockersf
Copy link
Member

As follow-up, consider changing the default despawn behavior to act recursively.

I think it's a good idea, but a bit controversial: definitely do that as a followup 👍

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 A-Hierarchy Parent-child entity hierarchies C-Code-Quality A section of code that is hard to understand or change D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Projects
None yet
Development

No branches or pull requests

2 participants