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)?
Antwort von Tak · 29 04 2014 um 07:44
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.
Antwort von Ipdfan · 23 11 2016 um 18:24
-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
Here's a follow-up question about removing texture/audio references: http://answers.unity3d.com/questions/1083990/how-to-remove-unneeded-references-texture-audio-wh.html
Do you have an idea how to do that?