summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-15 20:11:57 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-15 20:11:57 +0200
commit2d3c14850d68f117e2f4cf618c40b79c53ce49ec (patch)
tree01d29ed58afe1fab3d1546b66f948886e5b23903
parent3ac332a411dded89cdf47abf367ca017a88b2eb6 (diff)
parent4dca9975e751d341c7278d0baef3fe6fd310c8ae (diff)
Merge pull request #65152 from s77rt/fix-56343
Fix GDScript preload fails in standalone build unless files are present in directory
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index e37ac1dc3b..b6e7dc397a 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -3189,7 +3189,7 @@ void GDScriptAnalyzer::reduce_preload(GDScriptParser::PreloadNode *p_preload) {
p_preload->resolved_path = parser->script_path.get_base_dir().path_join(p_preload->resolved_path);
}
p_preload->resolved_path = p_preload->resolved_path.simplify_path();
- if (!FileAccess::exists(p_preload->resolved_path)) {
+ if (!ResourceLoader::exists(p_preload->resolved_path)) {
push_error(vformat(R"(Preload file "%s" does not exist.)", p_preload->resolved_path), p_preload->path);
} else {
// TODO: Don't load if validating: use completion cache.