Version: Unity 6.1 Alpha (6000.1)
Language : English
Dedicated Server optimizations
Dedicated Server AssetBundles

Build your application for Dedicated Server

You can create a Dedicated Server build in either of the following ways:

Unity Editor

To create a Dedicated Server build in the Unity Editor, use the following steps:

  1. Open the Build ProfilesA set of customizable configuration settings to use when creating a build for your target platform. More info
    See in Glossary
    window from File > Build Profiles.
  2. Select Add Build Profile to open the Platform Browser window.
  3. Select the type of server to build from the list of available platforms. For example, select Linux Server to build a Linux server.
  4. If the server type isn’t available, select Install with Unity Hub and follow the installation instructions. For information on how to install modules, refer to Add modules.
  5. Select Switch Profile to set the new build profile as the active profile.
  6. Click Build.

Tip: You can further configure the Dedicated Server build in the Player settingsSettings that let you set various player-specific options for the final game built by Unity. More info
See in Glossary
.

Scripting

To create a Dedicated Server build using a script, set buildPlayerOptions.subtarget to (int)StandaloneBuildSubtarget.Server.

buildPlayerOptions.target = BuildTarget.StandaloneWindows;
// SubTarget expects an integer.
buildPlayerOptions.subtarget = (int)StandaloneBuildSubtarget.Server;

Command line

To create a Dedicated Server build through the command line, use the -standaloneBuildSubtarget Server argument.

-buildTarget Linux64 -standaloneBuildSubtarget Server

Additional resources

Dedicated Server optimizations
Dedicated Server AssetBundles