1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #96499 from beev1s/shallow-script-cache-error

Fix resource loader not resolving shallow loaded scripts through dependencies
This commit is contained in:
Thaddeus Crews
2024-10-25 13:04:09 -05:00
3 changed files with 23 additions and 1 deletions

View File

@@ -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);