diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs index 129f8e97a7..5ec6621572 100644 --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -650,6 +650,11 @@ impl ScheduleGraph { .and_then(|system| system.inner.as_deref()) } + /// Returns `true` if the given system set is part of the graph. Otherwise, returns `false`. + pub fn contains_set(&self, set: impl SystemSet) -> bool { + self.system_set_ids.contains_key(&set.intern()) + } + /// Returns the system at the given [`NodeId`]. /// /// Panics if it doesn't exist.