Any Bevy experts on here? I'm trying to upgrade my project from 0.14.2 to 0.15.2 and there's a change that breaks:

commands

.entity(entity)

.insert(map.highlighted_material.clone_weak());

where map.highlighted_material is a Handle. The migration guide is less than useful: https://bevyengine.org/learn/migration-guides/0-14-to-0-15/#replace-handle-m-uimaterial-component-with-uimaterialhandle-wrapper

#rustlang #rust #bevy

Reply to this note

Please Login to reply.

Discussion

Answering my own question, in case it's useful to someone else. It needed wrapping in a MeshMaterial2d like so.