Files and directories guide

This page describes the directory structure of a SpatialOS project using the structured project layout (SPL).

There are examples of all configuration files in the Blank Project repository.

There is also a flexible project layout (FPL); for more information, see its introduction.


Specifies the basic details of a project, including its name, and the SpatialOS version the project uses.

For more information about this file see project definition specification page.

Example spatialos.json (from Blank Project)


A launch configuration file. You can have multiple launch configuration files in a project. You specify which one to use when you deploy by using spatial local launch or spatial cloud launch.

spatial local launch by default uses the launch configuration file default_launch.json. For spatial cloud launch, you need to specify the file name to use.

A project needs at least one launch configuration file.

For more information about these configuration files, including the file format, see the
Launch configuration file page.

Example default_launch.json (from Blank Project)


If you are using Git, you will have a .gitignore file in the root of your project. For more information about this file, see the GitHub help on ignoring files.


This directory contains your schema, written in schemalang.

For details on writing a schema, see the schema documentation.


This directory contains the code for the workers used by your simulated world. Its contents will depend on the types of workers you decide to use in your project.

Worker directories

The code for any worker types you build should be placed in a directory with the same name as the worker type, for example workers/pathfinding_worker/.

This directory must contain a spatialos.<worker_type>.worker.json file, which tells SpatialOS how to build, launch, and interact with the worker. The label you use as the worker_type will be used to identify this worker elsewhere in your project (for example, in the launch configuration file).

For details on the file format, see the Configuring a worker section.


Contains files generated by spatial worker build.

Updated about a year ago

Files and directories guide

Suggested Edits are limited on API Reference Pages

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