-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat(bevy_app): expose an API to perform updates for a specific sub-app. #14009
feat(bevy_app): expose an API to perform updates for a specific sub-app. #14009
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions for making the documentation more in line with the existing methods
@anlumo does this resolve your concerns? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on the doc nits, but this is a fundamentally reasonable method to exist.
Looks good to me! |
Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
…pp. (#14009) # Objective - Fixes #14003 ## Solution - Expose an API to perform updates for a specific sub-app, so we can avoid mutable borrow the app twice. ## Testing - I have tested the API by modifying the code in the `many_lights` example with the following changes: ```rust impl Plugin for LogVisibleLights { fn build(&self, app: &mut App) { let Some(render_app) = app.get_sub_app_mut(RenderApp) else { return; }; render_app.add_systems(Render, print_visible_light_count.in_set(RenderSet::Prepare)); } fn finish(&self, app: &mut App) { app.update_sub_app_by_label(RenderApp); } } ``` --- ## Changelog - add the `update_sub_app_by_label` API to `App` and `SubApps`. --------- Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Objective
Solution
Testing
many_lights
example with the following changes:Changelog
update_sub_app_by_label
API toApp
andSubApps
.