Get started
Note: The content on this page pertains to Game Server Hosting (Multiplay) available on the Unity Dashboard. If you’re using Game Server Hosting (Clanforge), see the Game Server Hosting (Clanforge) documentation.
This guide walks you through setting up Game Server Hosting as your project's game server orchestration platform. You’ll learn how to:
- Integrate your game server
- Create a build
- Create a build configuration
- Create a fleet
- Create a test allocation
Note: See Guides if you’ve already set up Game Server Hosting and want to learn how to perform a specific task.
Tip: Check out our YouTube video How to set up Game Server Hosting.
Prerequisites
Before you start, make sure you meet the following prerequisites:
- You have a Unity Dashboard account with at least one project.
- You have a game server executable that meets Game Server Hosting’s integration requirements.
Integrate your game server
The first step in the process of setting up Game Server Hosting is to integrate your game server executable. Game Server Hosting also refers to this executable as the build executable.
Select your game engine
Select the game engine your game server executable supports. Game Server Hosting is engine-agnostic, meaning you can use Unity, Unreal, or a custom engine.
Select the engine, then select Next to continue.
Link a Unity project
Before you continue, you must link your project with the Unity Dashboard using the Unity Editor.
Note: You can skip this step if you’ve already linked your project in the Unity Editor.
- Sign in to the Editor before linking the project to the Dashboard.
- Select File > Project Settings > Services.
- If you already have a Unity project, select Use an existing Unity project ID. To create a project from the Unity Editor, select your Organization, then Create project ID.
- Select Link project ID.
- There should be a message stating, “Project was linked successfully.”
After you’ve linked your project in the Unity Editor, select Next in the Unity Dashboard.
Tip: Refer to the Game Server SDK for Unity documentation to learn how to integrate your game with the Game Server SDK.
Link an Unreal project
Coming soon.
Link a custom project
Coming soon.
Install the Game Server Hosting package
After you’ve linked your project to the Unity Dashboard, you can install the latest version of the Game Server Hosting package.
Use the Unity Package Manager to import the Game Server Hosting package in the Unity Editor:
In Unity, navigate to Window > Package Manager.
In the Package Manager, select the plus icon (+) with the down arrow next to it.
Select Add package by name...
Paste the following text snippet into the Name field, then select Add.
com.unity.services.multiplay
After importing the Game Server Hosting package in the Unity Editor, select Finish in the Unity Dashboard.
Create a build
This guide walks you through creating your first build and supplements the embedded guide on the Unity Dashboard.
There are three ways to make a build:
Warning: Builds created with the direct file upload process doesn't support symbolic links. If you want to use symbolic links, you must use a Container build.
Warning: There’s a 4 GB limit per file uploaded directly through the Unity Dashboard interface. You can avoid this limit by using the Game Server Hosting API.
Fill in the build details
- Name the build.
- Select the operating system.
- Select the Upload method. You can upload the build files directly through the Unity Dashboard or add the build file files using a container image.
- Select Next.
Upload files
You can upload the build files directly through the Unity Dashboard or add the build files using a container image.
Note: If you’re using a Unity build, make sure you upload the *.so
files, the *.x86_64
file, and the *_Data
folder.
Upload directly through the Unity Dashboard
- Add the files required to run your game or application. The files must be in a loose, unzipped folder. At a minimum, the build files must contain an executable form of your game or application.
- Select Upload Files.
- After the files finish uploading, select Next.
Upload with a container
You can upload your build with a container by adding the container to the Game Server Hosting registry.
Add to registry
Follow the below instructions to add your pre-built container image to the Game Server Hosting registry.
- Log into the Game Server Hosting container registry.
- Push your container image to the Game Server Hosting registry.
- Select Next.
Select container image
- Choose the method you want to add the container to the Game Server Hosting registry. You can use the Unity Dashboard interface or the Game Server Hosting CLI.
- Find the container image by typing its name in the Container image field.
- Select Finish.
Create a release
Select Finish to create the first release automatically. Game Server Hosting can’t run a build on a server unless the build has at least one release.
You now have a new build. Before using the build, you need to create (and link) a build configuration and a fleet.
Create a build configuration
Create a build configuration for the build you created in the earlier step. Refer the Build configuration documentation to learn more.
- Define the usage settings:
- Select Custom.
- Set the CPU speed to value. The CPU speed defines the CPU frequency in megahertz (MHz).
- Set the Memory value. The memory defines the amount of RAM (random access memory) in megabytes (MB).
- Select Finish.
Set the build configuration details
The first steps are to name the build configuration, link it to a specific build, and define any additional details about the build configuration.
- Select Create a build configuration.
- Fill in the build configuration details.
- Name the build configuration.
- Select the build you created in the last step.
- Select the build executable.
- Select the Query type. The recommended best practice is to use SQP as the query protocol.
- If you plan to use custom launch parameters, enable Custom launch parameters, then use the edit field to set the launch parameters.
- Select Next.
Define any configuration variables
The next step is to add configuration variables. Add each configuration variable you want to track in this build configuration, then select Next.
If you’re unsure or don’t want to track any additional parameters here, you can continue to the next step without making any changes.
Define the usage settings
After you’ve set up all the configuration variables you want, it’s time to define the usage settings for this build configuration.
The usage settings defined in a build configuration tell Game Server Hosting how many resources each server has access to when running this build using this build configuration.
You can use the default recommended usage settings by leaving Default selected, then selecting Next.
If you know the resource requirements of your game server, you can also specify custom usage settings. Refer to Calculate usage settings to learn how to calculate usage settings.
To define custom usage settings:
- Select Custom.
- Set the CPU speed to value. CPU speed defines the CPU frequency in megahertz (MHz).
- Set the Memory value. Memory defines the amount of RAM (random access memory) in megabytes (MB).
- Select Finish.
You now have a new build and build configuration.
Create a fleet
This guide walks you through creating your first build and supplements the embedded guide on the Unity Dashboard.
Define the fleet details
The first step in creating a fleet is defining the fleet details, such as the name, the operating system, and the build configurations.
- Provide a name for the fleet.
- Select the operating system. Note: You can't change the operating system later.
- Select the build configuration you created in the previous step. You can link more build configurations later.
- Select Next.
Define the fleet scaling settings
One of the most important considerations of a fleet is the scaling settings. The scaling settings of a fleet are composed of a Min available servers value and a Max servers value for each region within the fleet.
- Add a region to the fleet. You can add as many regions as you need, each with distinct scaling settings.
- Specify the Min available servers value for the region.
- Specify the Max servers value for the region.
- Select Finish.
You now have a fleet, a build configuration, and a build configured and ready. To view the servers for this fleet, go to Game Server Hosting > Servers.
Create a test allocation
Create a test allocation to make sure everything’s working correctly. Refer to the Test allocation documentation for help.
- Select Create a test allocation.
- Select the Fleet, the Region, and the Build configuration.
- Select Next.
- Select Run test.
- Wait for the test to complete.
- Select Finish.
Next steps
Congratulations! You’ve successfully set up Game Server Hosting. You can continue to the Game Server Hosting Dashboard to:
- View analytics about your fleet.
- Configure more builds, build configurations, and fleets.
- Create more test allocations.
You can also configure other Unity services, such as Matchmaker, Analytics, or Cloud Code.