make register_component_hooks method for App #16921
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!
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 appWhat alternative(s) have you considered?
add a helper
fn register_component_hooks(&mut self)
to Appthis makes it easier to find instead of having to know it exists on World that you can access from App
The text was updated successfully, but these errors were encountered: