My exported game doesn't work if it's not in the res:// folder. Why?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pvskp


I’m trying to export my game into a single .exe file. The “Export Mode” is set to “Export all files in the project” and I also made some tests using the “Embed Pck” option, but the game only opens if the .exe is in the game directory. When a put it in debugging mode, I can see that it can’t reach some files, which returns me the error “No loader found for resource” and “Failed loading resource” to a lot of files. What am I doing wrong?

(I’m using Windows)

When you move the exe file, do you also move the pck file that comes with it?

exuin | 2021-04-02 01:28

Yep. Sometimes I missed that and a pop-up tells me that it could not find the .pck file. When the .exe can find it, it returns me the error that a mentioned.

pvskp | 2021-04-02 01:48

:bust_in_silhouette: Reply From: exuin

I think there might be a bunch of reasons that this is happening. First off, “Export all resources in the project” only exports Resources, not all files. You will need to specify all the files to export in the filters below. Also, it’s possible you might have capitalizations errors in the paths since Windows doesn’t care about capitalization.

Wow… I just selected the “Export selected resources (and dependencies)” and checked everything and that worked! Thanks!!! I spend a lot of time trying to fix this lol

(sorry if after all that was just a dumb question… but you really saved me!!!)

pvskp | 2021-04-02 03:03