Skip to content

Commit 6f291a0

Browse files
authored
Fix panic when using debug_asset_server (#8485)
# 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
1 parent a1e442c commit 6f291a0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/bevy_text/src/font.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use bevy_render::{
55
texture::Image,
66
};
77

8-
#[derive(Debug, TypeUuid)]
8+
#[derive(Debug, TypeUuid, Clone)]
99
#[uuid = "97059ac6-c9ba-4da9-95b6-bed82c3ce198"]
1010
pub struct Font {
1111
pub font: FontArc,

crates/bevy_text/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub const DEFAULT_FONT_HANDLE: HandleUntyped =
7676
impl Plugin for TextPlugin {
7777
fn build(&self, app: &mut App) {
7878
app.add_asset::<Font>()
79+
.add_debug_asset::<Font>()
7980
.add_asset::<FontAtlasSet>()
8081
.register_type::<Text>()
8182
.register_type::<Text2dBounds>()

0 commit comments

Comments
 (0)