Skip to main content

watch_layer_image_assets

Function watch_layer_image_assets 

Source
pub fn watch_layer_image_assets(
    events: MessageReader<'_, '_, AssetEvent<Image>>,
    images: Query<'_, '_, (Entity, &ImageNode)>,
    registry: Res<'_, LayersRegistry>,
    dirt: ResMut<'_, LayerContentDirt>,
)
Expand description

<image> textures arrive asynchronously — no op, no bevy-react write site — so watch the asset events and dirty the owning layer of any node using a touched image. (One frame late for loads, which are async anyway; canvas uploads are also Modified here, double-covering their direct tap.)