Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion crates/bevy_render/src/render_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,15 @@ pub(crate) fn extract_render_asset<A: RenderAsset>(
// Removed to ensure that the asset is always "really" removed from the
// render world when the last strong handle is dropped.
if !removed.contains(id) {
modified.insert(*id);
// Assets that are RENDER_WORLD only are expected to be removed from the main world
// without impact in the render world. Only trigger a modification if the asset is
// also used in the MAIN_WORLD.
if let Some(asset) = assets.get(*id) {
let asset_usage = A::asset_usage(asset);
if asset_usage.contains(RenderAssetUsages::MAIN_WORLD) {
modified.insert(*id);
}
}
}
}
AssetEvent::Unused { id } => {
Expand Down