summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorSaracen <SaracenOne@gmail.com>2023-10-29 22:37:54 +0000
committerSaracen <SaracenOne@gmail.com>2023-11-15 18:55:20 +0000
commitf392a9c4f81e6ea5f55c3fa7af0ca94de44ce463 (patch)
tree52f86fd8eb2830e535e32b37f724bb8a3c594fc9 /editor/editor_node.cpp
parent56a2b143a2d8868fdbaba798b7b0145516397f48 (diff)
downloadredot-engine-f392a9c4f81e6ea5f55c3fa7af0ca94de44ce463.tar.gz
Fix CACHE_MODE_REPLACE
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index e9276a5681..106c0d5241 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6216,8 +6216,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());
@@ -6324,8 +6323,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];