Configuring a worker

This section explains where and how to configure the workers in a SpatialOS project.

Worker directory

Code for workers goes in directories in the workers/ directory of a project, for example workers/unity.

You’re not limited to one worker type per directory: if workers share code or assets, they can go in the same directory.
For example, the workers/unity/ directory should contain both
the UnityWorker and the UnityClient.

Configuration file

Each worker needs a worker configuration file, with the name spatialos.<worker_type>.worker.json: for example,
spatialos.UnityWorker.worker.json or spatialos.UnityClient.worker.json.

This file tells SpatialOS how to build, launch, and interact with the workers.

Once you’ve chosen a label for the worker type (eg myWorkerType), you MUST use this exact label consistently throughout your
project to identify this worker type.

Due to current UnitySDK limitations, the type of Unity-based workers MUST be either UnityWorker or UnityClient.