-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Hot asset reloading example does not update when saving torus.gltf #14698
Description
Bevy version
0.14.1
Relevant system information
Tested on:
- Windows 10
- Linux (Ubuntu)
What you did
Ran the hot_asset_reloading example on my Window 10 desktop, and Ubuntu laptop.
CLI args:
cargo run --example hot_asset_reloading --features file_watcherWhat went wrong
Updating the torus gltf file does not update the model while running. Specifically, I updated the rotation quaternion in the file. Only restarting the app shows me the change.
Additional information
Editing the base color of the monkey model (same example) in version 0.11 seems to work,
though if I add a rotation quaternion, the monkey's rotation only updates upon restarting the app.
On a personal project, I'm listening for image events AssetEvent<Image>:
pub fn read_image_events(
mut events: EventReader<AssetEvent<Image>>,
) {
for event in events.read() {
println!("Got event: {event:?}");
}
}This system runs in the Update schedule.
When starting up my game, my console logs the following:
Got event: Added { id: AssetId<bevy_render::texture::image::Image>{ index: 3, generation: 0} }
Got event: Added { id: AssetId<bevy_render::texture::image::Image>{ index: 5, generation: 0} }
Got event: Added { id: AssetId<bevy_render::texture::image::Image>{ index: 4, generation: 0} }
After updating / saving an image file image a couple of times, the console log looks like this:
Got event: Added { id: AssetId<bevy_render::texture::image::Image>{ index: 3, generation: 0} } // Old
Got event: Added { id: AssetId<bevy_render::texture::image::Image>{ index: 5, generation: 0} } // Old
Got event: Added { id: AssetId<bevy_render::texture::image::Image>{ index: 4, generation: 0} } // Old
2024-08-10T20:33:26.687117Z INFO bevy_asset::server: Reloading maps\tilesets\spring_forest.png because it has changed // New
2024-08-10T20:33:26.769548Z INFO bevy_asset::server: Reloading maps\tilesets\spring_forest.png because it has changed // New
2024-08-10T20:33:39.859572Z INFO bevy_asset::server: Reloading maps\tilesets\spring_forest.png because it has changed // New
2024-08-10T20:33:39.951233Z INFO bevy_asset::server: Reloading maps\tilesets\spring_forest.png because it has changed // New
The four new lines at the end are bevy's internal logging.
Clearly, bevy is detecting the change, but for some reason, it does not fire AssetEvent::<Image>::Modified events.
The PBR models that I'm spawning do not seem to update either.
They do update if I restart the app, or do something that causes them to reload manually.