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

make register_component_hooks method for App #16921

Open
PhaestusFox opened this issue Dec 21, 2024 · 0 comments · May be fixed by #16977
Open

make register_component_hooks method for App #16921

PhaestusFox opened this issue Dec 21, 2024 · 0 comments · May be fixed by #16977
Labels
A-App Bevy apps and plugins C-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@PhaestusFox
Copy link

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

currently, you can register component hooks only when you impl Componet or have mut world access.
if you want to register hooks when building your App you need to call app.world_mut().register_component_hooks() and then register them

What solution would you like?

add a fn register_component_hooks<T>(&mut self, hook: ComponentHook) to App so it is easy to register hooks when making an app

What alternative(s) have you considered?

add a helper fn register_component_hooks(&mut self) to App
this makes it easier to find instead of having to know it exists on World that you can access from App

@PhaestusFox PhaestusFox added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Dec 21, 2024
@BenjaminBrienen BenjaminBrienen added A-App Bevy apps and plugins S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Straightforward Simple bug fixes and API improvements, docs, test and examples and removed S-Needs-Triage This issue needs to be labelled labels Dec 24, 2024
@pin3-free pin3-free linked a pull request Dec 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-App Bevy apps and plugins C-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants