-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
0.4.0
Operating system & version
Windows 10
What you did
Spawned a TextBundle using a mostly defaulted Text struct (only specified the value).
commands
.spawn(CameraUiBundle::default())
.spawn(TextBundle{
text: Text{
value: "test text".to_string(),
..Default::default()
},
..Default::default()
})
What you expected to happen
I expected that one of two things would happen:
- Error message due to trying to render text without specifying a font. (either compile time by not having Text be default-able, or run time)
- Have a default font be used.
What actually happened
The app builds and runs fine, but the text doesn't show on screen (which makes sense, as there is no font specified).
Initializing the Text struct with a font worked as expected. (adding ...font: asset_server.load("fonts/font_name.ttf"),...
Additional information
This may be intended behaviour, but I found it unexpected as a new user of Bevy. I see that there exists an issue for adding a built-in font (#1017), which would address the issue.
Metadata
Metadata
Assignees
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsGraphical user interfaces, styles, layouts, and widgetsC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior