You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receive a warning about the missing file before it's been replaced
After the file has been replaced, its changes are still detected and it is hot reloaded, so the cube is displayed instead of the monkey.
What actually happened
Receive a warning, as expected:
WARN bevy_asset::asset_server: encountered an error while reading an asset: path not found: /home/trouv/projects/bevy/assets/models/monkey/Monkey.gltf
After the file has been replaced, the monkey remains on display.
Additional information
I believe this is the main blocker for hot reloading "external levels" for LDtk files in my ldtk plugin. See this issue: Trouv/bevy_ecs_ldtk#1. I think somehow exposing the notify::poll::PollWatcher's delay to the bevy api somehow (maybe as a field in AssetServerSettings) could help resolve this issue. However, ideally I think bevy should fire AssetEvent::Modified in this scenario.
Sorry if this issue is upstream.
The text was updated successfully, but these errors were encountered:
I think ldtk using writeFileSync is wrong either way. It allows other programs to observe a partially written state. The proper way to atomically change a file on unix is to first write it to a different file and then rename this file over the original file. This ensures that any program that had the original file open before writing will keep seeing the original file and any program opening the file after writing will see the new file. At no point would the file be missing.
I see, that makes sense. Still, I think it would be nice for bevy to detect changes in files after it can't read them for whatever reason. Whether it's missing or partially written or whatever
Bevy version
main, 7356f15
Operating system & version
Arch Linux
What you did
cp assets/models/cube/cube.bin assets/models/monkey/
hot_asset_reloading
example#!/bin/bash mv assets/models/monkey/Monkey.gltf assets/models/monkey/Monkey.gltf.bak sleep 1 cp assets/models/cube/cube.gltf assets/models/monkey/Monkey.gltf
What you expected to happen
What actually happened
Additional information
I believe this is the main blocker for hot reloading "external levels" for LDtk files in my ldtk plugin. See this issue: Trouv/bevy_ecs_ldtk#1. I think somehow exposing the
notify::poll::PollWatcher
's delay to the bevy api somehow (maybe as a field inAssetServerSettings
) could help resolve this issue. However, ideally I thinkbevy
should fireAssetEvent::Modified
in this scenario.Sorry if this issue is upstream.
The text was updated successfully, but these errors were encountered: