We are excited to share that the Unity Build Automation team has officially launched support for building Dedicated Server applications for Linux and Mac targets. The addition of these options completes our support of Dedicated Server builds, which are now available for Windows, Linux, and Mac desktop targets.
Dedicated Server is a desktop sub-target that optimizes server build efficiency by automatically stripping unnecessary assets and code during project builds. This results in space and processing efficiency, making it more cost-effective for server operators to run server applications created with Unity.
The feature is available through our API and dashboard for Windows, Linux, and Mac Standalone Desktop targets using Unity version 2021.3.x or newer, built on a builder with Windows OS (Windows targets) or Mac OS (Mac and Linux targets).
Building a Dedicated Server sub-target
To enable the feature for your build target on the UBA dashboard, create a new desktop target, and select a Unity version option that matches 2021.3 or newer in the Basic Settings tab. Next go to the Advanced Settings tab and check the Enable dedicated server option.
To enable the feature using our API, you can set the property: settings.advanced.unity.editorUserBuildSettings.standaloneBuildSubtarget=“Server” if your sub-target is not a Dedicated Server, you don’t need to set this property at all, as it is set to “Player” by default - refer to the Unity Manual for more details on this option: https://docs.unity3d.com/ScriptReference/StandaloneBuildSubtarget.html
It is important to note that Headless mode is still supported for Unity versions 2021 and older.