Launch configuration file

GDKs for Unreal and Unity

The flexible project layout does not apply to the GDKs for Unreal and Unity. They use the structured project layout.

This file contains the configuration parameters for starting a deployment. You can specify it in the [launch_configuration] field of a project configuration or pass it to spatial alpha local launch or spatial alpha cloud launch via the --launch_config flag.

File structure and fields

The launch configuration file has no naming conventions, but it should have the following structure:

{
  "template": "...",
  "dimensionsInWorldUnits": {
    "x": 100,
    "z": 100
  },
  "loadBalancing": {
    "layerConfigurations": [
      {
        "layer": "...",
        "hexGrid": {
          "numWorkers": ...
        }
      }
    ]
  },
  "snapshot": {
    "takeSnapshotIntervalSeconds": "600"
  },
  "streamingQueryInterval": 4,
  "runtimeFlags": [
    {
      "name": "...",
      "value": "..."
    }
  ],
  "workerFlags": [
    {
      "workerType": "...",
      "flags": [
        {
          "name": "...",
          "value": "..."
        }
      ]
    }
  ]
}

The following table shows the fields that you are required or optional to specify in the launch configuration file:

Field Required/Optional Description
template Required Defines the compute resources your deployment needs (its ‘topology’). See the game templates page to find out which game template you should use.
dimensionsInWorldUnits Required Describes how big the world should be. "x" and "z" parameters must both be greater than 0.
loadBalancing Optional The new load balancing configuration as documented in load balancing with layers.
snapshot Optional Defines snapshot related settings. It contains one optional field:
- takeSnapshotIntervalSeconds: The frequency in seconds to automatically write snapshots of your simulated world. The minimum duration is 600 seconds (10 minutes). Set to 0 to disable automatic snapshots. The default value is 0.
streamingQueryInterval Optional Period in seconds between successive streaming query updates. The default value is 4 seconds.
runtimeFlags Optional The Runtime flags that can control advanced Runtime features. Equivalent to legacy flags.
workerFlags Optional Specifies global configuration parameters per worker type. See worker flags for more information.

2020-06-22 Page updated with editorial review: amended information about game templates.

Updated about a year ago


Launch configuration file


Suggested Edits are limited on API Reference Pages

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