Skip to content

Commit

Permalink
register TextFont and TextColor in app type registry (#15950)
Browse files Browse the repository at this point in the history
# Objective

`TextFont` and `TextColor` is not registered in the app type registry
and serializing a scene with a a `Text2d` doesn't save the color and
font of the text entity.

## Solution

register `TextFont`  and `TextColor`  in the type registry
  • Loading branch information
atornity authored Oct 16, 2024
1 parent e4f501c commit 40b9a0a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bevy_text/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ impl Plugin for TextPlugin {
fn build(&self, app: &mut App) {
app.init_asset::<Font>()
.register_type::<Text2d>()
.register_type::<TextFont>()
.register_type::<TextColor>()
.register_type::<TextSpan>()
.register_type::<TextBounds>()
.init_asset_loader::<FontLoader>()
Expand Down

0 comments on commit 40b9a0a

Please sign in to comment.