Skip to content

Commit

Permalink
Merge pull request godotengine#65152 from s77rt/fix-56343
Browse files Browse the repository at this point in the history
Fix GDScript preload fails in standalone build unless files are present in directory
  • Loading branch information
akien-mga committed Sep 15, 2022
2 parents 3ac332a + 4dca997 commit 2d3c148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gdscript/gdscript_analyzer.cpp
Expand Up @@ -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.
Expand Down

0 comments on commit 2d3c148

Please sign in to comment.