Skip to content

Commit

Permalink
Fix panic when using debug_asset_server (#8485)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #8484

## Solution

Since #8445 fonts need to register a debug asset, otherwise the
`debug_asset_server` feature doesn't work. This adds the debug asset
registration
  • Loading branch information
nicopap authored Apr 25, 2023
1 parent a1e442c commit 6f291a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_text/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_render::{
texture::Image,
};

#[derive(Debug, TypeUuid)]
#[derive(Debug, TypeUuid, Clone)]
#[uuid = "97059ac6-c9ba-4da9-95b6-bed82c3ce198"]
pub struct Font {
pub font: FontArc,
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_text/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ pub const DEFAULT_FONT_HANDLE: HandleUntyped =
impl Plugin for TextPlugin {
fn build(&self, app: &mut App) {
app.add_asset::<Font>()
.add_debug_asset::<Font>()
.add_asset::<FontAtlasSet>()
.register_type::<Text>()
.register_type::<Text2dBounds>()
Expand Down

0 comments on commit 6f291a0

Please sign in to comment.