I've made a script, that saves custom resources. Everything works fine until I try to overwrite an already existing resource, to update it.
When overwriting, the resource file is properly saved and I can see the data is correct when I look at it in an external text editor. However, when inspecting the resource in Godot, the editor still has the old version of the resource loaded.
If I first manually delete the file (in the filesystem dock, not via script) and then save the resource it is correctly loaded.
Is there any way to avoid this hassle? How can I tell Godot to reload a resource?
My save script looks like this at the moment:
var res = create_resource()
var filepath = path+"../"+res.name+".tres"