mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fixed resource loader using not fully loaded scripts
This commit is contained in:
parent
7c383767a2
commit
fd5fc9f3ee
3 changed files with 23 additions and 1 deletions
|
|
@ -311,7 +311,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()) {
|
||||
|
|
@ -358,6 +358,7 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
|
|||
return script;
|
||||
}
|
||||
}
|
||||
script->set_path(p_path, true);
|
||||
|
||||
if (p_update_from_disk) {
|
||||
if (p_path.get_extension().to_lower() == "gdc") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue