File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ fn change_material(
7575 if let Some ( material) = mesh_materials
7676 . get ( descendants)
7777 . ok ( )
78- . and_then ( |id| asset_materials. get_mut ( id. id ( ) ) )
78+ . and_then ( |id| asset_materials. get_cloned_mut ( id. id ( ) ) )
7979 {
8080 // Create a copy of the material and override base color
8181 // If you intend on creating multiple models with the same tint, it
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ fn animate_materials(
9191 mut materials : ResMut < Assets < StandardMaterial > > ,
9292) {
9393 for ( i, material_handle) in material_handles. iter ( ) . enumerate ( ) {
94- if let Some ( material) = materials. get_mut ( material_handle) {
94+ if let Some ( material) = materials. get_cloned_mut ( material_handle) {
9595 let color = Color :: hsl (
9696 ( ( i as f32 * 2.345 + time. elapsed_secs ( ) ) * 100.0 ) % 360.0 ,
9797 1.0 ,
You can’t perform that action at this time.
0 commit comments