Closed monitz87 closed 1 month ago
Hello, if fix the suggested works for you, we certainly should fix this before 4.3 releases. Thanks for raising this to our awareness.
I have removed nearly all uses of FileAccess.file_exists, but did not test the 4.3 exports. If you could test them again with the latest main branch, then maybe we could close this 🙏??
Thanks!
Okay I've tested it and exports are working again for me on 4.3.dev5 with the latest main branch. Will close this.
The problem
Describe the bug
Summary: Godot 4.3 re-added script compilation to exported builds, which causes issues when Dialogic inspects the file system
Similar to #1587 , using
FileAccess.file_exists
instead ofResourceLoader.exists
causes trouble when running exported builds that convert scripts into binary..gd
files get turned into.gdc
and.gd.remap
, which makesFileAccess.file_exists
return false even if the script actually exists.ResourceLoader.exists
on the other hand knows how to handle these remappings and returns true as it should. In this specific scenario, when the Dialogic singleton is loading the subsystems, the indexer scripts aren't found, so no subsystems are loaded, which causes other errors down the line.I don't see any reason to use
FileAccess.file_exists
overResourceLoader.exists
anywhere in Dialogic tbh. At the moment, there are plenty of occurrences of the former across the codebase.ResourceLoader.exists
is more robust against export remap shenanigans, and unless I'm mistaken, all file manipulation in Dialogic is internal to the game that is using it.To Reproduce Steps to reproduce the behavior:
Dialogic.Styles.load_style("foo")
)load_style
innil
Expected behavior The subsystems should load correctly
System (please complete the following information):