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

Added App::with_component_hooks #16977

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ impl App {
self
}

/// Allows access to [`World`]'s [`register_component_hooks`] method directly from the app.
/// Allows access to [`World::register_component_hooks`] method directly from the app.
///
/// # Examples
///
Expand All @@ -1348,7 +1348,7 @@ impl App {
/// ```
pub fn with_component_hooks<T>(
&mut self,
hooks: impl Fn(&mut ComponentHooks) -> (),
hooks: impl Fn(&mut ComponentHooks)
) -> &mut Self
where
T: Component,
Expand Down
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ Example | Description
[System Parameter](../examples/ecs/system_param.rs) | Illustrates creating custom system parameters with `SystemParam`
[System Piping](../examples/ecs/system_piping.rs) | Pipe the output of one system into a second, allowing you to handle any errors gracefully
[System Stepping](../examples/ecs/system_stepping.rs) | Demonstrate stepping through systems in order of execution.
[With Component Hooks](../examples/ecs/with_component_hooks.rs) | Demonstrate how to use the with_component_hooks API

## Games

Expand Down