Game loads scene fine in editor but just loads music and no scene once exported to exe

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

Everything works fine including saving/loading in the editor, but when I export to exe it no longer loads the scene. It partially loads because the music starts playing but nothing else loads.

Do you see any error messages when exporting the project in debug mode and looking at the console output?

Calinou | 2018-08-29 22:38

:bust_in_silhouette: Reply From: talador

Got it working by including the game files in the directory besides the scripts and import and godot project. I was thinking I just needed the .exe and the .pck file to run. It was failing to load resources.

You shouldn’t need to include the game files besides the exported executable, the PCK file should be enough if all required files were exported (which may not be the case if you’re loading project resources at run-time). You may need to specify a filter for non-resource files to be exported — for instance, if you load music directly in your scripts, you will need to add *.ogg, *.wav as an export filter.

Calinou | 2018-08-31 08:35