summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-13 23:43:18 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-13 23:43:18 +0100
commitdc99c8d4a4e2456da2988dac078e3085d2034664 (patch)
tree160b828d58d7baef2593858edf85c721cf2976d6 /editor
parent921b656f33676336dccfe15baca63853222ecfd7 (diff)
parent2e09985c0d2579d32238272b0dd3c70ef4821430 (diff)
downloadredot-engine-dc99c8d4a4e2456da2988dac078e3085d2034664.tar.gz
Merge pull request #87008 from KoBeWi/cache_mode_replace_fixes²
Fix² behavior of ResourceFormatLoader `CACHE_MODE_REPLACE`
Diffstat (limited to 'editor')
-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 89ee57e190..fbd2ef8517 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5624,8 +5624,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());
@@ -5732,8 +5731,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];