mirror of https://github.com/godotengine/godot
Merge pull request #70810 from adamscott/cache-gdscript-even-when-error
Cache script when reloading even if there's errors
This commit is contained in:
commit
dc3175e4cd
|
|
@ -298,13 +298,7 @@ Ref<GDScript> GDScriptCache::get_full_script(const String &p_path, Error &r_erro
|
||||||
singleton->full_gdscript_cache[p_path] = script;
|
singleton->full_gdscript_cache[p_path] = script;
|
||||||
singleton->shallow_gdscript_cache.erase(p_path);
|
singleton->shallow_gdscript_cache.erase(p_path);
|
||||||
|
|
||||||
r_error = script->reload(true);
|
script->reload(true);
|
||||||
if (r_error) {
|
|
||||||
singleton->shallow_gdscript_cache[p_path] = script;
|
|
||||||
singleton->full_gdscript_cache.erase(p_path);
|
|
||||||
return script;
|
|
||||||
}
|
|
||||||
|
|
||||||
return script;
|
return script;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue