Revert "Fixed resource loader using not fully loaded scripts"

This reverts commit fd5fc9f3ee.

This caused significant regressions which are worse than the bug that #96499
aimed to address.

- Reverts #96499.
- Reopens #95909.
- Supersedes #102063.
- Fixes #99006.
- Fixes #101615.
This commit is contained in:
Rémi Verschelde 2025-02-04 19:51:39 +01:00
parent 0b6a717ac1
commit daa074881b
3 changed files with 1 additions and 23 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_cache(p_path);
script->set_path(p_path, true);
if (remapped_path.get_extension().to_lower() == "gdc") {
Vector<uint8_t> buffer = get_binary_tokens(remapped_path);
if (buffer.is_empty()) {
@ -360,7 +360,6 @@ 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);