Skip to content

Commit 11c8a50

Browse files
committed
3D
1 parent e258611 commit 11c8a50

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

src/plugin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ impl Plugin for SpritesheetAnimationPlugin {
8282
sprite3d::setup_rendering,
8383
sprite3d::sync_when_sprites_change,
8484
sprite3d::sync_when_atlases_change,
85-
sprite3d::remove_unloaded_standard_materials,
8685
)
8786
.in_set(Sprite3dSystemSet)
8887
.after(AnimationSystemSet),

src/systems/sprite3d.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -418,20 +418,3 @@ fn try_get_or_create_mesh(
418418
})
419419
})?
420420
}
421-
422-
// Purges unloaded materials from our internal cache
423-
// TODO not working since we're not holding a weak handle since Bevy 0.17?
424-
pub(crate) fn remove_unloaded_standard_materials(
425-
mut cache: ResMut<Cache>,
426-
mut standard_material_events: Option<MessageReader<AssetEvent<StandardMaterial>>>,
427-
) {
428-
if let Some(standard_material_events) = &mut standard_material_events {
429-
for event in standard_material_events.read() {
430-
if let AssetEvent::Removed { id } = event {
431-
cache.materials.retain(|_, handle| handle.id() != *id);
432-
}
433-
}
434-
}
435-
}
436-
437-
// TODO we should also purge the mesh cache

0 commit comments

Comments
 (0)