diff --git a/crates/bevy_text/Cargo.toml b/crates/bevy_text/Cargo.toml index c5d09c09d6d9f..99da231f78cd9 100644 --- a/crates/bevy_text/Cargo.toml +++ b/crates/bevy_text/Cargo.toml @@ -16,6 +16,7 @@ default_font = [] bevy_app = { path = "../bevy_app", version = "0.14.1" } bevy_asset = { path = "../bevy_asset", version = "0.14.1" } bevy_color = { path = "../bevy_color", version = "0.14.2" } +bevy_derive = { path = "../bevy_derive", version = "0.14.1" } bevy_ecs = { path = "../bevy_ecs", version = "0.14.1" } bevy_math = { path = "../bevy_math", version = "0.14.1" } bevy_reflect = { path = "../bevy_reflect", version = "0.14.1", features = [ diff --git a/crates/bevy_text/src/font_atlas.rs b/crates/bevy_text/src/font_atlas.rs index aa426c67e5550..cdb7da4dd7acc 100644 --- a/crates/bevy_text/src/font_atlas.rs +++ b/crates/bevy_text/src/font_atlas.rs @@ -91,11 +91,10 @@ impl FontAtlas { offset: IVec2, ) -> Result<(), TextError> { let atlas_layout = atlas_layouts.get_mut(&self.texture_atlas).unwrap(); - let atlas_texture = textures.get_mut(&self.texture).unwrap(); if let Some(glyph_index) = self.dynamic_texture_atlas_builder - .add_texture(atlas_layout, texture, atlas_texture) + .add_texture(atlas_layout, textures, texture, &self.texture) { self.glyph_to_atlas_index.insert( cache_key,