From 905a3dc2c9e66a74bbff05cfc1daf93eeb05e9b7 Mon Sep 17 00:00:00 2001 From: MichiRecRoom <1008889+LikeLakers2@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:48:25 -0500 Subject: [PATCH] Expose access to `SubApps` within `App` --- crates/bevy_app/src/app.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs index a755b978ed081..aa6dfb62e99cd 100644 --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1058,6 +1058,16 @@ impl App { &mut self.sub_apps.main } + /// Returns a reference to the [`SubApps`] collection. + pub fn sub_apps(&self) -> &SubApps { + &self.sub_apps + } + + /// Returns a mutable reference to the [`SubApps`] collection. + pub fn sub_apps_mut(&mut self) -> &mut SubApps { + &mut self.sub_apps + } + /// Returns a reference to the [`SubApp`] with the given label. /// /// # Panics