What does the headless build option do?

When building for Linux, there’s a checkbox for “Headless Mode”. I know how to start instances with -batchmode and -nographics (that’s not the question here), but I’m wondering what Headless Mode changes in the build?

  • I noticed the builds are slightly smaller, but are there are still all assets included, including sounds and textures?
  • It seems that the textures and sounds are still loaded when running the build, is that true?
  • Is there a way to run it without loading textures and sounds (eg. to save memory on servers)?

Headless mode means the player is built without any reference to X11 and friends, meaning that you can run a headless player on a server that doesn’t have X installed. In all other respects, behavior is identical to a normal player with -batchmode and -nographics.

Textures and sounds are still included in the build, and loaded in the player as normal - Unity doesn’t know what you want to do with your player - just because you’re not displaying a texture doesn’t mean you don’t want to do something with it.

-batchmode -nographics don’t equal Headless Mode checkbox in Unity “Build Settings”

C:\Program Files\Unity\Editor\Unity.exe -quit -batchmode -nographics -projectPath “c:\myproj” -buildLinuxUniversalPlayer “c:\myprojbin”

Without X:

Headless Mode checkbox - don’t crash

-batchmode or -nographics - crash

@Ipdfan I ticked the headless mode checkbox but when turn the play mode on, nothing happens. The graphics are rendered as they usually are with ticking the headless mode.