Skip to main content

mark_2d_meshes_as_changed_if_their_assets_changed

Function mark_2d_meshes_as_changed_if_their_assets_changed 

Source
pub fn mark_2d_meshes_as_changed_if_their_assets_changed(
    meshes_2d: Query<'_, '_, &mut Mesh2d>,
    mesh_asset_events: MessageReader<'_, '_, AssetEvent<Mesh>>,
)
Expand description

A system that marks a Mesh2d as changed if the associated Mesh2d asset has changed.

This is needed because the system that extracts meshes, extract_2d_meshes, write some metadata about the mesh into the GPU structures that they build that needs to be kept up to date if the contents of the mesh change.