Linux standalone: no "Headless Mode" option in command line build

Hi,

I have an automation script for building Unity projects. Web build runs just fine but I cannot produce Linux standalone build with headless option.

My options for Unity.exe cmd run are: -batchmode -quit -nographics -projectPath %somepath% -buildLinux64Player %outputexecutablepath%

I’m trying to run resulting executable on Ubuntu Server 64-bit and first error I receive is: libGLU.so.1: cannot open shared object file: No such file or directory

After checking with ldd it’s clear that executable build is linked with graphics - X11 or whatever, that means it is not headless.

At the same time if I open same project in Unity Editor, select “Build Settings”, there is a checkbox “Headless Mode” in “PC, Mac & Linux Standalone” - Linux, x86_64 mode. I press Build and this time executable is fine, it does not refer to any graphics libraries.

I’ve checked Unity - Scripting API: BuildOptions but found nothing like “headless mode” there.

I have a feeling that headless option is not taken from the project itself as it is saved as enabled and Editor picks that option up correctly. Or Devs should add some special cmd flag for enabling Linux “headless mode”.

Anyone tried the same? Or should I go directly to Unity Support.

Thanks a lot.

This is just a Documentation bug, can be closed. Doc thread: Please fix the documentation: BuildOptions.EnableHeadlessMode - Web Resources - Unity Discussions

This can be closed now.