3. Upload and launch your game

1. Set your SpatialOS project name

When you signed up for SpatialOS, your account was automatically associated with an organisation and a project, both of which have the same generated name.

Step 1. Find this name by going to the Console.

The name should look something like beta_randomword_anotherword_randomnumber.

Example autogenerated SpatialOS project name

Step 2. Update your spatialos.json.

Using a text editor of your choice, open gdk-for-unity-fps-starter-project/spatialos.json and replace the unity_gdk project name with the project name you were assigned in the Console. This tells SpatialOS which SpatialOS project you intend to upload to.

Your spatialos.json should look something like this:

  "name": "beta_yankee_hawaii_621",
  "project_version": "0.0.1",
  "sdk_version": "14.6.1"

Step 3. Reference your Unity project in the Deployment Launcher window.

Open the Deployment Launcher window in your Unity Editor by selecting SpatialOS > Deployment Launcher.

Ensure the Project Name matches the one specified in your spatialos.json. If it does not match, press the refresh button at the top of the Deployment Launcher window to update the project name.

2. Configure the deployment environment

Outside of China

No action is required.

In China

Note: Only follow the in-China instructions if you are located in China and deploying your game to server nodes hosted in China. You must be located in China to deploy to server nodes hosted in China. Note that in the documentation, "China" refers to mainland China only.

In the Unity Editor, select Edit > Project Settings... > Spatial OS to open the Project Settings window.

Then set the Environment field to cn-production.

3. Upload your worker assemblies

An assembly is a bundle of code, art assets and other files necessary to run your game in the cloud.

To run a deployment in the cloud, you need to upload the worker assemblies to your SpatialOS project.

Ensure that the Assembly Name is set in the Assembly Upload section of your Deployment Launcher window. The assembly name is a string you choose made up of alphanumeric characters, _, ., and -. For example, my_assembly.

Example Deployment Launcher window showing the Assembly Upload section completed

Select Upload assembly to start the upload.

Note: If you want to overwrite an existing assembly, ensure the Force Upload option is enabled. Depending on your network speed, the upload may take a little while (1-10 minutes) to complete.

The assembly has finished uploading when:

  • You see the following message in your Unity Editor Console window: Upload of <assembly_name> succeeded.
  • The notification at the bottom of the Deployment Launcher window has disappeared.

4. Launch a cloud deployment

The next step is to start a cloud deployment using the assembly that you just uploaded.

You should find that the my_deployment configuration is already pre-completed in the FPS Starter Project. Ensure that you have chosen to launch the my_deployment configuration, then select Launch deployment.

Note: You will see that there is a configuration with two deployments listed in the Deployment Launcher window. The first listed is your FPS Starter Project, the second is a deployment for simulated players. You will find out more about simulated players in later steps.

This starts the process of launching your deployments. This may take a few minutes.

It’s finished when the notification at the bottom of the Deployment Launcher window disappears and the Console pages for both deployments open automatically in your browser.

Well done getting set up!

It’s time to play your game.

Updated about a year ago

3. Upload and launch your game

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.