Deploy a Multiplay build configuration
Learn how to use the Deployment window in the Unity Editor to deploy a Multiplay configuration.
You can deploy a Multiplay configuration directly from the Unity editor.
The Multiplay config file is a YAML file that consists of the following collections:
- Builds: Builds constitute the binary of a game to upload to Multiplay Hosting.
- Build Configurations: The Build Configuration specifies how the build runs.
- Fleets: The fleets are sets of machines assigned to run build configurations.
Prerequisites
Before you start, ensure you have done the following:
- Set up a Unity Cloud Dashboard account with at least one project.
- Linked your cloud project to the active Unity project.
Install the required packages
To enable the integration between the Multiplayer Services SDK and Deployment, install the following packages:
- In the Unity Editor, navigate to Window > Package Manager.
- Select Unity Registry.
- Search for Deployment.
- Select Install.
- Still in the Unity Registry, search for Multiplayer Services.
- Select Install.
Set up the Deployment window
You can deploy Multiplay configurations to your cloud environment using the Deployment window.
Once you install the Deployment package, you can access it from the Unity Editor. Once you install the Deployment package, you can access the Deployment window from the Unity Editor by selecting Services > Deployment.
Before you can use the Deployment window, select the environment to which you want to deploy.
- In the Unity Editor, select Services > Deployment.
- Select Deployment Settings.
- In the Environments window that opens, select an Editor Environment.
Create a Multiplay configuration
To create a Multiplay configuration:
- In the Unity Editor's Project window, right-click (macOS: Ctrl+click) in the
Assets
folder. - Select Create > Services > Multiplay Config.
Edit a Multiplay configuration
You can edit the Multiplay environment configuration directly from the Unity Editor or from an IDE of your choice.
- In the Project window, right-click (macOS: Ctrl+click) on the
multiplay_config.gsh
YAML file you created above. - Select Show in Explorer on Windows or Reveal in Finder on macOS.
- Open the file with your text editor of choice.
- Customize the file according to your project. The file has the following format:
version: 1.0 builds: my build: # replace with the name for your build executableName: Build.x86_64 # the name of your build executable buildPath: Builds/Multiplay # the location of the build files excludePaths: # paths to exclude from upload (supports only basic patterns) - Builds/Multiplay/DoNotShip/*.* - Builds/Multiplay/Server_Data/app.info buildConfigurations: my build configuration: # replace with the name for your build configuration build: my build # replace with the name for your build queryType: sqp # sqp or a2s, delete if you do not have logs to query binaryPath: Build.x86_64 # the name of your build executable commandLine: -port $$port$$ -queryport $$query_port$$ -log $$log_dir$$/Engine.log # launch parameters for your server variables: {} fleets: my fleet: # replace with the name for your fleet buildConfigurations: - my build configuration # replace with the names of your build configuration regions: North America: # North America, Europe, Asia, South America, Australia minAvailable: 0 # minimum number of servers running in the region maxServers: 1 # maximum number of servers running in the region usageSettings: - hardwareType: CLOUD #The hardware type of a machine. Can be CLOUD or METAL. machineType: GCP-N2 # Machine type to be associated with these setting. * For CLOUD setting: In most cases, the only machine type available for your fleet is GCP-N2. * For METAL setting: Please omit this field. All metal machines will be using the same setting, regardless of its type. maxServersPerMachine: 2 # Maximum number of servers to be allocated per machine. * For CLOUD setting: This is a required field. * For METAL setting: This is an optional field.
Deploy the Multiplay configuration
To deploy the Multiplay configuration:
- In the Deployment window, double-click on the Multiplay configuration.
- Right-click (macOS: Ctrl+click) a Multiplay configuration, then select Deploy.
- Enable the checkbox next to the environment that you are ready to deploy.
- Select Deploy Selected.
Troubleshooting
If your configuration assets don't appear in the Deployment window, make sure domain reloading is activated.
- In the Unity Editor, go to Edit > Project Settings.
- Select Editor.
- Verify that the Enter Play Mode Settings > When entering Play Mode setting is Reload Domain and Scene or Reload Domain only.