Nilirad / bevy_prototype_lyon

Draw 2D shapes in Bevy
Apache License 2.0
702 stars 87 forks source link

Mesh2dHandle points to no asset #245

Closed repelmoine closed 3 months ago

repelmoine commented 7 months ago

Hello, In my project, I wanted to be able to pick shapes from bevy_prototype_lyon using bevy_mod_picking.

I'm new in bevy but I tried debugging and found that in version 0.10 the entity had an Aabb component and that the Mesh2dHandle component was associated with an asset. capture_version_0 10

Since version 0.11, there is no longer an Aabb component and Mesh2dHandle points to no asset. capture_version_0 11

I've noticed that if i modify the following line, the code works again. I don't understand what are the impacts this change might have, but it solves my problem and the shapes are pickable as the Mesh2dHandle is linked to an asset again.

https://github.com/Nilirad/bevy_prototype_lyon/blob/0351fbddca346453f78d401497728a21ea49a9ee/src/plugin.rs#L132 to

RenderAssetUsages::all()

Thanks for all :heart:

ramneekhanda commented 3 months ago

any hope for a fix?