- Home /
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)?
Answer by Tak · Apr 29, 2014 at 07:44 AM
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.
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?
Answer by Ipdfan · Nov 23, 2016 at 06:24 PM
-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
Your answer
Follow this Question
Related Questions
Headless Linux build 100% CPU usage 2019 vs 10% 2018 1 Answer
Headless linux server 2 Answers
Headless mode checkbox is uncheckable 1 Answer
Pink objects with -batchmode -nographics 1 Answer
Optimizing Headless Servers 2 Answers