After setting up your project, you can run a local SpatialOS deployment. This runs your game, along with a local version of SpatialOS (which will run your server-side workers).
This creates a similar environment to the one used for deployments in the cloud. For information about running a cloud SpatialOS deployment, see Deploying to the cloud.
From the command line
To run a local SpatialOS deployment from the command-line, from a terminal in the root directory of your
spatial local launch. This assumes you have a default
launch configuration file (
spatial local launch <launch configuration>, where
launch configurationspecifies the launch configuration file you want to use. For example,
development.json. For information about this file, see the launch configuration page.
spatial local launch --help for more information.
- In the Unity Editor, open the SpatialOS window (
Window > SpatialOS).
Run SpatialOS locally, click
This opens a console running
spatial local launch.
Stop a local deployment
spatial local is running, use
Ctrl + C to stop it.
Run workers from the command line
To manually run a worker locally, use
spatial local worker launch <worker type> <launch_config>, where
worker type: the type of the worker. For example,
launch_config: the launch configuration file.
spatial local worker launch --help for more information.
For example, to start a
UnityClient using the
default launch configuration, run
spatial local worker launch UnityClient default
When successful, you will see the new Unity client worker at http://localhost:21000/inspector.
Was this page helpful?
Thanks for letting us know!
Thanks for your feedback
Need more help? Ask on the forums