mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
f51a306b30
# Objective - Fixes https://github.com/bevyengine/bevy/issues/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> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |