From bad610c712021391babe60237093b633be366860 Mon Sep 17 00:00:00 2001 From: Jakob Hellermann Date: Fri, 17 Feb 2023 11:26:53 +0100 Subject: [PATCH] make ScheduleGraph::initialize public --- crates/bevy_ecs/src/schedule/schedule.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs index 16387d1f0cf90..8d0a034af17c3 100644 --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -216,6 +216,8 @@ impl Schedule { /// Initializes any newly-added systems and conditions, rebuilds the executable schedule, /// and re-initializes the executor. + /// + /// Moves all systems and run conditions out of the [`ScheduleGraph`]. pub fn initialize(&mut self, world: &mut World) -> Result<(), ScheduleBuildError> { if self.graph.changed { self.graph.initialize(world); @@ -772,7 +774,8 @@ impl ScheduleGraph { Ok(()) } - fn initialize(&mut self, world: &mut World) { + /// Initializes any newly-added systems and conditions by calling [`System::initialize`] + pub fn initialize(&mut self, world: &mut World) { for (id, i) in self.uninit.drain(..) { match id { NodeId::System(index) => {