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
This commit is contained in:
Nicola Papale 2023-04-25 12:11:11 +02:00 committed by GitHub
parent a1e442cd2a
commit 6f291a037f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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,

View file

@ -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>()