Sites

Menu
These are the docs for 13.7, an old version of SpatialOS. The docs for this version are frozen: we do not correct, update or republish them. 14.1 is the newest →

Configuring the project (spatialos.json)

This is the main configuration file of your project. It references the other configuration files that SpatialOS requires in order to run, and includes basic information about your project.

Configuration file

The file must be called spatialos.json and must have the following structure:

{
  "configurationVersion": "0.1",
  "projectName": "demo",
  "schemaDescriptor": "./schema/bin/schema.descriptor",
  "launchConfiguration": "./launch_configs/deployment.json",
  "clientWorkers": [
    "./client_config.json"
  ],
  "serverWorkers": [
    "./server_a_config.json",
    "./server_b_config.json"
  ]
}
Field Required/Optional Description
configurationVersion Required Specifies the version of the configuration file itself. This documentation is for configuration version 0.1 and this field should always be set to this value if you intend to use features described here.
projectName Required The name of the project assigned to you by Improbable. It’s used in the Console and for deployments. It should be between 3 and 32 characters long and contain letters, numbers and underscores. See Project name for more information.
schemaDescriptor Required A relative (to the location of this file) or absolute path to the schema descriptor file to start deplopyments with. The schema descriptor is a binary file that allows the SpatialOS Runtime to interpret your project’s schema and is necessary for starting a SpatialOS deployment both locally and in the cloud. You can create a schema descriptor using the schema compiler tool. You can find an example of how to generate this file here.
launchConfiguration Optional A relative (to the location of this file) or absolute path to the default launch configuration to start deployments with. You can overwrite the launch configuration to use with the --launch_config flag when starting a deployment with the spatial CLI.
clientWorkers Optional A list of relative (to the location of this file) or absolute paths to the client-worker configuration files of this project. See the client-worker configuration page for more details.
serverWorkers Optional A list of relative (to the location of this file) or absolute paths to the server-worker configuration files of this project. See the server-worker configuration page for more details.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums