diff --git a/pipelined/bevy_render2/src/render_graph/graph.rs b/pipelined/bevy_render2/src/render_graph/graph.rs index daf5d37be9ff8..23d6c40932d4a 100644 --- a/pipelined/bevy_render2/src/render_graph/graph.rs +++ b/pipelined/bevy_render2/src/render_graph/graph.rs @@ -261,6 +261,18 @@ impl RenderGraph { self.nodes.values_mut() } + pub fn iter_sub_graphs(&self) -> impl Iterator { + self.sub_graphs + .iter() + .map(|(name, graph)| (name.as_ref(), graph)) + } + + pub fn iter_sub_graphs_mut(&mut self) -> impl Iterator { + self.sub_graphs + .iter_mut() + .map(|(name, graph)| (name.as_ref(), graph)) + } + pub fn iter_node_inputs( &self, label: impl Into,