-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
A-TextRendering and layout for charactersRendering and layout for charactersA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times
Description
Bevy version
0.9.1
What went wrong
Changing the Color of a TextSection trips change detection causing the entire Text to be needlessly recomputed.
Additional information
Workaround:
text_query.for_each_mut(|mut text| {
text.bypass_change_detection().text.sections[0].style.color = new_color;
});Metadata
Metadata
Assignees
Labels
A-TextRendering and layout for charactersRendering and layout for charactersA-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times