diff --git a/crates/bevy_ecs/src/schedule/state.rs b/crates/bevy_ecs/src/schedule/state.rs index 41060c1efbe6e4..3b4c894a8c1bc1 100644 --- a/crates/bevy_ecs/src/schedule/state.rs +++ b/crates/bevy_ecs/src/schedule/state.rs @@ -392,6 +392,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)]