About Dedicated Server package
The Dedicated Server 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 are present only on the Standalone builds and removed in the Dedicated Server ones.
Note: This experimental package is under active development, it is meant to be used with the purpose of workflow testing and providing feedback.
Instalation
To install this package, follow the instructions in the Package Manager documentation.
Requirements
This version of Dedicated Server is compatible with the following versions of the Unity Editor:
- 2023.1 and later (recommended)
- Dedicated Server Build Support module installed.
Known Limitations
Dedicated Server package includes the following known limitations in its experimental version:
- When using the Entities package, the Game Objects and Components selection will not affect the entities and components baking of subscenes.
Using Dedicated Server package
Game Objects selection from scenes.
Allows to select which Game Objects should be present/removed in the different multiplayer targets. When building or entering play mode, Unity will automatically strip the corresponding Game Objects (and all its children).
Workflow
- Open a scene.
- In the hierarchy window, select one or more Game Objects.
- In the inspector window, find the "Multiplayer Target" field and pick one of the options: Dedicated Server, Standalone.
Components selection from scenes
Allows to select which specific Components should be present/removed from its Game Object in the different multiplayer targets. When building or entering play mode, Unity will automatically strip the corresponding Components.
Workflow
- Open a scene.
- In the Hierarchy window, select one or more Game Objects.
- In the Inspector window, in the component section, find the "Multiplayer Target" field and pick one of the options: Dedicated Server, Standalone.
Selection from the Search Window
Allows to select multiple GameObjects of Components given a search criteria.
Workflow
- Open a scene.
- Open the Search Window
- Search for the objects to select (e.g. all renderers
t: Renderer
) - Select the objects
- In the Preview Inspector panel, find the "Multiplayer Target" field and pick one of the options: Dedicated Server, Standalone.
Prefab Assets and Instances
- Similar to Game Objects above, with one difference:
- To modify a base Prefab Asset, either select the Prefab Asset within the Project window, or select a Prefab Instance within the Hierarchy Window and click 'Open'.
- To modify a Prefab Instance, which is the actual GameObject in the scene, select the Prefab Instance within the Hierarchy window. The changes here will take precedence over those in the base Prefab Asset.
Automatic Components selection
Allows to select which specific Components should be present/removed from the project scenes and prefabs in the different multiplayer targets. When building or entering play mode, Unity will automatically strip the corresponding Components including its subclasses.
Workflow
- In the Player Settings window, select the Dedicated Server settings
- In the Multiplayer Selection section, add the list of components to be selected for the entire project.
- For each component in the list, find the "Multiplayer Target" field and pick one of the options: Dedicated Server, Standalone.