summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_cache.cpp
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-25 13:04:09 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-25 13:04:09 -0500
commit2584f755375c788d99284f776e6e0a004253f65c (patch)
treed06fbc8ff1e7eb335cf96fd10ea2bf3437cde21b /modules/gdscript/gdscript_cache.cpp
parent07e759b74a34e1d58f7704c7f6a68fb53c263247 (diff)
parentfd5fc9f3eed26cb8c27e4a8ede29a4e539c1998a (diff)
downloadredot-engine-2584f755375c788d99284f776e6e0a004253f65c.tar.gz
Merge pull request #96499 from beev1s/shallow-script-cache-error
Fix resource loader not resolving shallow loaded scripts through dependencies
Diffstat (limited to 'modules/gdscript/gdscript_cache.cpp')
-rw-r--r--modules/gdscript/gdscript_cache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp
index 3c022412bd..fa22798edf 100644
--- a/modules/gdscript/gdscript_cache.cpp
+++ b/modules/gdscript/gdscript_cache.cpp
@@ -312,7 +312,7 @@ Ref<GDScript> GDScriptCache::get_shallow_script(const String &p_path, Error &r_e
Ref<GDScript> script;
script.instantiate();
- script->set_path(p_path, true);
+ script->set_path_cache(p_path);
if (remapped_path.get_extension().to_lower() == "gdc") {
Vector<uint8_t> buffer = get_binary_tokens(remapped_path);
if (buffer.is_empty()) {
@@ -360,6 +360,7 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
return script;
}
}
+ script->set_path(p_path, true);
const String remapped_path = ResourceLoader::path_remap(p_path);