diff options
author | kobewi <kobewi4e@gmail.com> | 2024-01-09 15:48:48 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2024-01-09 16:01:37 +0100 |
commit | 2e09985c0d2579d32238272b0dd3c70ef4821430 (patch) | |
tree | f2c297a9c03d07e4a7c16b239e347842920366b3 /editor | |
parent | 8297ec949bad8029372da13e1d4e36599989b5ae (diff) | |
download | redot-engine-2e09985c0d2579d32238272b0dd3c70ef4821430.tar.gz |
Fix² behavior of ResourceFormatLoader CACHE_MODE_REPLACE
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 549f62276d..3eb40b1931 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6170,8 +6170,7 @@ void EditorNode::reload_instances_with_path_in_edited_scenes(const String &p_ins if (edited_scene_map.size() > 0) { // Reload the new instance. Error err; - Ref<PackedScene> instance_scene_packed_scene = ResourceLoader::load(p_instance_path, "", ResourceFormatLoader::CACHE_MODE_IGNORE, &err); - instance_scene_packed_scene->set_path(p_instance_path, true); + Ref<PackedScene> instance_scene_packed_scene = ResourceLoader::load(p_instance_path, "", ResourceFormatLoader::CACHE_MODE_REPLACE, &err); ERR_FAIL_COND(err != OK); ERR_FAIL_COND(instance_scene_packed_scene.is_null()); @@ -6278,8 +6277,7 @@ void EditorNode::reload_instances_with_path_in_edited_scenes(const String &p_ins // be properly updated. for (String path : required_load_paths) { if (!local_scene_cache.find(path)) { - current_packed_scene = ResourceLoader::load(path, "", ResourceFormatLoader::CACHE_MODE_IGNORE, &err); - current_packed_scene->set_path(path, true); + current_packed_scene = ResourceLoader::load(path, "", ResourceFormatLoader::CACHE_MODE_REPLACE, &err); local_scene_cache[path] = current_packed_scene; } else { current_packed_scene = local_scene_cache[path]; |