
/// Adds memory tracking for [`Image`] assets.
#[derive(Debug, Default)]
pub struct ImageMemoryUsagePlugin;

impl Plugin for ImageMemoryUsagePlugin {
    fn build(&self, app: &mut bevy::prelude::App) {
        app.register_asset_with_estimator::<Image, ImageSizeEstimator>();
    }
}

#[derive(Debug, Default)]
struct ImageSizeEstimator;

impl DataSizeEstimator<Image> for ImageSizeEstimator {