From 8a23a2d499407b8ec98a999220f73564eb124711 Mon Sep 17 00:00:00 2001 From: Harry Barber Date: Mon, 14 Feb 2022 11:20:38 +0000 Subject: [PATCH] Add clear_schedule --- crates/bevy_ecs/src/schedule/state.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/bevy_ecs/src/schedule/state.rs b/crates/bevy_ecs/src/schedule/state.rs index 7dcbefb6afb87..29847743d136f 100644 --- a/crates/bevy_ecs/src/schedule/state.rs +++ b/crates/bevy_ecs/src/schedule/state.rs @@ -398,6 +398,11 @@ where pub fn inactives(&self) -> &[T] { self.stack.split_last().map(|(_, rest)| rest).unwrap() } + + /// Clears the scheduled state operation. + pub fn clear_schedule(&mut self) { + self.scheduled = None; + } } #[derive(Debug, Error)]