Closed shekohex closed 2 days ago
Hi!
Thanks for the high qualtiy PR!
I did the same kind of changes on the Bevy 0.15 branch but I did not realize that not having these actually broke hot-reload. I will release a fixed version with you fix.
Again, thanks for your contribution 👍
Overview
While trying this awesome plugin and trying it out for the first time, I've noticed that whenever I change something in tiled, it does not hot-reload it in my game, even though I get this in my logs:
But nothing actually happens. Turns out that the query for the changed map, never return anything, or basically it does not match on anything.
After applying this fix, it now works and when I change something it tiled, it hot reloads it in my game.
Changes
This pull request includes changes to the
src/lib.rs
file to update the handling of map events and improve code readability. The most important changes involve modifying the type used for map handles and updating the corresponding method calls.Changes to map handle type:
src/lib.rs
: Updated themap_query
parameter infn handle_map_events
to useTiledMapHandle
instead ofHandle<TiledMap>
.src/lib.rs
: Updated themap_query
parameter infn remove_map_by_asset_id
to useTiledMapHandle
instead ofHandle<TiledMap>
.Method call updates:
src/lib.rs
: Modified the method call frommap_handle.id()
tomap_handle.0.id()
infn handle_map_events
.src/lib.rs
: Modified the method call frommap_handle.id()
tomap_handle.0.id()
infn remove_map_by_asset_id
.