Version: Unity 6 Beta (6000.0)
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 Profiles 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
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961