Post #1852018
2026-02-24 07:43 UTC
@renardboy In a nutshell, headless debug build works just fine. Headless release build ends up disconnecting a bunch of signals and throwing things like
ERROR: Failed to create an autoload, script 'res://lib/GlobalVars.cs' is not compiling.
at: _create_autoload (editor/settings/editor_autoload_settings.cpp:409)
Current workflow is:
godot --headless --import
dotnet restore
dotnet build game.csproj -c Release --self-contained true
godot --headless --editor --quit <-- errors like above for each autoload class
verify that .godot/global_script_class_cache.cfg has more than 8 bytes in it or error out <-- this is where I get stuck
godot --headless --export-release Linux/X11 ./export/linux/game.x86_64
I've found many contradicting things on the web about the right way to do this. I had it working once, but I think that was due to some weird caching stuff that was way more brittle than I'm comfortable with.
Replies (1)
-
@renardboy@mastodon.social 2026-02-24 23:10
@uberduck Hmm, not sure I can be as helpful as I would have wanted here. Do all your custom classes that extend godot classes have parameterless constructors in addition to any other constructors you have? IME this causes all kinds of weird issues if you don't have them. Everytime I've had unexplainable issues so far it was that.