From cb428c4354223af235e93972d4ef182f6cddeab1 Mon Sep 17 00:00:00 2001 From: koe Date: Mon, 11 Mar 2024 17:37:10 -0500 Subject: [PATCH] also cache the global context --- crates/bevy_ui/src/stack.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/bevy_ui/src/stack.rs b/crates/bevy_ui/src/stack.rs index b25106db05387..f7b0a1d673670 100644 --- a/crates/bevy_ui/src/stack.rs +++ b/crates/bevy_ui/src/stack.rs @@ -76,6 +76,7 @@ pub fn ui_stack_system( ui_stack.uinodes.clear(); ui_stack.uinodes.reserve(total_entry_count); fill_stack_recursively(&mut cache, &mut ui_stack.uinodes, &mut global_context); + cache.push(global_context); for (i, entity) in ui_stack.uinodes.iter().enumerate() { if let Ok(mut node) = update_query.get_mut(*entity) {