StarArawn / bevy_ecs_tilemap

A tilemap rendering crate for bevy which is more ECS friendly.
MIT License
943 stars 198 forks source link

adopted: Track changed Image assets and use them to update image caches #547

Closed rparrett closed 3 months ago

rparrett commented 3 months ago

Original PR text:

Previously, since the bind groups do not get updated every frame, modified image assets would not be rebound. This caused hot reloading to no longer work. Similarly, the TextureArrayCache (when not using atlas) would not invalidate modified assets, so the textures would become out-of-date.

Note there can be other reasons that an asset can be modified, so this should keep the assets more up-to-date in general.

Fixes https://github.com/StarArawn/bevy_ecs_tilemap/issues/430 Alternative to #431

Testing

I modified tiles.png and observed hot reloading occurring with:

cargo run --example basic --features=bevy/file_watcher cargo run --example basic --features=atlas --features=bevy/file_watcher