change bevy text live #9148
Unanswered
ZATTYAMOND
asked this question in
Q&A
Replies: 1 comment
-
At the bottom of that example, there is a system that literally changes text: fn text_update_system(
diagnostics: Res<DiagnosticsStore>,
mut query: Query<&mut Text, With<FpsText>>,
) {
for mut text in &mut query {
if let Some(fps) = diagnostics.get(FrameTimeDiagnosticsPlugin::FPS) {
if let Some(value) = fps.smoothed() {
// Update the value of the second section
text.sections[1].value = format!("{value:.2}");
}
}
}
} Is that what you are looking for? Or do you want to get user-editable Input? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i wanna change my bevy text live i am using this example i am using 0.11 here is the example https://bevyengine.org/examples/ui/text/ how can i pls show me a code example
Beta Was this translation helpful? Give feedback.
All reactions