Errors loading resources only after exporting project

Godot Version

4.3

Question

I recently went to export a demo version of a project I’ve been working on and found that several errors popped up with the export that have not showed up in the standard debugger, specifically the following errors:

Has anyone experienced something like this and know why it appears only after exporting? I tried printing out all files in the function get_files_with_suffix(suffix) and found all have the suffix .remap, yet for some reason only the (alphabetically first) antipaladin file brings up this error.

seems like you’re dinamically loading resources with file access. Try removing the remap extension before loading it

Can you clarify what you mean by removing the .remap extension before loading? And why this would be necessary after exporting but not before?


load_path = load_path.trim_suffix(".remap")
var resource = load(load_path)

Engine changes your project folder when the project is exported. This is because your files are not bundled in export, but their binary/resource optimized files are bundled instead