Script That Does Work In Editor Doesn't Work On Export

Godot Version

4.2.2.stable.arch_linux (Editor)
v4.2.2.stable.official.15073afe3 (Export)


The project at the above repo does work without issues on the editor, but doesn’t on export. Specifically the “” script.

The issue doesn’t occure when the game is ran with the godot --main-pack command, only when executed with the exported runtime.

While the issue persists in both 4.2.2 and 4.2.1, it does not in Godot 4.1.

The issue persists on Web, Windows, and Linux.

Logs when ran in shell: gdbug.log · GitHub

  1. ResourceImporters are for the editor.
  2. Use load() to load resources. E.g. = load("res://audio/takedown.ogg")
  3. Use AudioStreamOggVorbis.load_from_file() when directly loading “ogg” files from the file system.
1 Like

Thank you for your help! While I now understand that ResourceImporterOggVorbis is only for the editor, shouldn’t there be a warning/error on the export to prevent others, like myself, from falling into the pit that I just did?

I absolutely agree. The docs also don’t mention how it is only included in editor builds.

I spent many hours trying to solve this issue. Documentation is not great in this area and some warnings when exporting a project would be helpful.