Closed panzergame closed 1 year ago
Quick note that on larger than trivial escn files, this frequently causes godot to segfault, or other strange behavior (some object transforms are weird, matching neither old nor new file)
Will work on improving this workflow after 3,1 is out, together with the new 3D demo.
bump @reduz
Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
I confirm this bug is still in Godot v4 alpha 16. I have an escn file instanced in a tscn. When I update the escn, Godot does its thing, it reloads according to the popup with progress bars inside, but then nothing changes in the tscn.
When I go to the folder .godot/imported and delete both the scn and md5 files whil Godot is open, to force an update, Godot regenerates them but unchanged, I don't know where it gets the old data... probably from memory because when I close Godot, delete the md5 and scn files, then reopen Godot, it generates them correctly.
@coderarnold Does it update if you restart the editor? (without deleting any files)
No it doesn't. However I found out that if I close in the editor the tscn which is referencing the escn, then regenerate the escn (must be different), it reloads correctly and I can reopen the tscn. It's a bit tedious but this workaround works.
Well that does sound similar to #61423
Possibly yes.
Likely fixed by #71409. Please reopen the issue if you are still affected. See also #61423 was closed
Godot version: master (8ce6444f595839d6c0128427d17100b6f361e26c)
OS/device including version: Linux localhost.localdomain 4.9.95-gentoo #2 SMP Wed Jun 27 16:10:10 -00 2018 x86_64 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz GenuineIntel GNU/Linux
Issue description:
escn
files are not reloaded when modifiedSteps to reproduce: Create a
escn
file with a sub resourceArrayMesh
and aMeshInstance
usign it, then open it in godot through any project, back to theescn
and modify the first array index of theArrayMesh
, back to godot it reloads resources but the mesh is unchanged.Debugging Some debug prints were added in branch (dirty sorry) https://github.com/panzergame/godot/tree/debug_escn_reload to expose in details the loading of property "surfaces/0"
The first init look like :
After modifying the escn the debug prints are the same, using gdb and a breakpoint to
ResourceInteractiveLoaderBinary::open
which open the file used inResourceInteractiveLoaderBinary::parse_variant(Variant &r_v)
, the parent functionsResourceLoader::_load
,ResourceLoader::load
and finallyResourceFormatImporter::load
are certainly using a wrong path. The path gets fromResourceFormatImporter::_get_path_and_type
isres://.import/test.escn-de1328157aaff12ffc6ce9d30945ff18.scn
which is still the old resource. This is confirmed by the fact that deleting the.import
directory force the recreation of the resource properly.Other than that the
ArrayMesh
is recreated every time andadd_surface
is called every time.So the path seems incorrect or the file targeted by this path isn't updated.
Minimal reproduction project: escn_reload.zip