diff --git a/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs b/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs index 87245d463f6bd..34e3ae87a7c76 100644 --- a/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs +++ b/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs @@ -1,10 +1,7 @@ use crate::TextureAtlasLayout; use bevy_image::{Image, TextureFormatPixelInfo}; use bevy_math::{URect, UVec2}; -use bevy_render::{ - render_asset::{RenderAsset, RenderAssetUsages}, - texture::GpuImage, -}; +use bevy_render::render_asset::RenderAssetUsages; use guillotiere::{size2, Allocation, AtlasAllocator}; /// Helper utility to update [`TextureAtlasLayout`] on the fly. @@ -53,9 +50,8 @@ impl DynamicTextureAtlasBuilder { )); if let Some(allocation) = allocation { assert!( - ::asset_usage(atlas_texture) - .contains(RenderAssetUsages::MAIN_WORLD), - "The asset at atlas_texture_handle must have the RenderAssetUsages::MAIN_WORLD usage flag set" + atlas_texture.asset_usage.contains(RenderAssetUsages::MAIN_WORLD), + "The atlas_texture image must have the RenderAssetUsages::MAIN_WORLD usage flag set" ); self.place_texture(atlas_texture, allocation, texture);