pub fn free_egui_textures_system(
egui_user_textures: ResMut<'_, EguiUserTextures>,
egui_render_output: Query<'_, '_, (Entity, &EguiRenderOutput)>,
egui_managed_textures: ResMut<'_, EguiManagedTextures>,
image_assets: ResMut<'_, Assets<Image>>,
image_event_reader: MessageReader<'_, '_, AssetEvent<Image>>,
)Expand description
This system is responsible for deleting image assets of freed Egui-managed textures and deleting Egui user textures of removed Bevy image assets.
If you add textures via EguiContexts::add_image or EguiUserTextures::add_image by passing a weak handle,
the systems ensures that corresponding Egui textures are cleaned up as well.