Game World!

Join A World Of Gamers

Enter your email address:

Delivered by FeedBurner

Followers

Popular Posts

Monday 28 June 2021

What is headless mode unity?

 

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)?

3 Antworten

 · Antwort hinzufügen
avatar image
8
Beste Antwort

Antwort von Tak 

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?

avatar image
0

Antwort von Ipdfan 

-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

avatar image
0

Antwort von gargd 

@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.

Floating Button

Button