About the Dedicated Server package
Use the Dedicated Server package when you use the Dedicated Server build target to switch a project between the server and client role without the need to create another project. To do this, use Multiplayer roles to distribute GameObjects and components accross the client and server.
This package contains optimizations and workflow improvements for developing Dedicated Server platform. For example, you can use Dedicated Server package to mark all render components of a scene so they're present only on the Standalone builds and removed in the Dedicated Server ones.
Installation
To install this package, follow the instructions in the Package Manager documentation.
Requirements
This version of Dedicated Server has the following requirements:
- Unity Editor 2023.3 and later.
- Dedicated Server Build Support module installed.
Compatibility
The Dedicated Server package is compatible with the following multiplayer packages:
- Multiplayer play mode: Use this package with the Dedicated Server package to determine whether each virtual player acts as a client or server.
- Netcode for GameObjects: Use this package with the Dedicated Server package to define which GameObjects and Components exist in the different multiplayer roles.
- Netcode for Entities: When you use this package with the Dedicated Server package, the multiplayer roles of GameObjects and Components don't affect how Unity bakes entities and components in subscenes. To perform Client and Server stripping on entities, refer to Ghost snapshots.
Features list
- CLI Arguments Defaults: Provides an UI in the build window for defining default values for the CLI arguments used to launch the game server.
- Multiplayer Roles: Allows to decide which multiplayer role (Client, Server) to use in each build target.
- Content Selection: Provides UI and API for selecting which content (GameObjects, Components) should be present/removed in the different multiplayer roles.
- Automatic Selection: Provides UI and API for selecting which component types should be automatically removed in the different multiplayer roles.
- Safety Checks: Activates warnings that helps detecting potential null reference exceptions caused by stripping objects for a multiplayer role.
Known Limitations
The Dedicated Server package has the following known limitations:
- Multiplayer Roles don't apply to specific build profiles. Build profiles use the same Multiplayer Role as the the build target of that profile.