Skip to content

Commit

Permalink
also cache the global context
Browse files Browse the repository at this point in the history
  • Loading branch information
UkoeHB committed Mar 11, 2024
1 parent dc575b4 commit cb428c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/bevy_ui/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cb428c4

Please sign in to comment.