Manual setup guide for Windows
This guide will prepare your Windows machine for local development with the SpatialOS SDK.
1. System requirements
We support up-to-date versions of Windows 7 and 10.
Before following the setup guide check that your machine meets the hardware requirements.
2. Set up the SpatialOS CLI
To set up the SpatialOS CLI (
spatialfor Windows (64bit): Download.
spatial, you agree to the SpatialOS EULA.
spatial.exein a directory where you have administrator privileges.
Add the directory containing
PATHby following these instructions.
Check this succeeded by running
spatial updatein your terminal. You should get the output:
Current version of the 'spatial' command-line tool: <version number>
Attempting to download the latest version...
3. (optional) Set up Unity or Unreal
You only need to complete this step if you’re planning to use the Unity SDK or the Unreal SDK with SpatialOS.
Set up Unity
To use the Unity SDK, even if you’ve already got Unity installed, you must follow these steps, because SpatialOS only supports specific versions of Unity, and requires specific build support.
If you haven’t got it installed already, download and install Visual C++ Redistributable for Visual Studio 2015.
Go to the Unity Download Archive.
Next to version 2017.3.0, from the “Downloads (Win)” dropdown, click “Unity Installer” (which downloads the installer).
Run the installer.
If you already have Unity 2017.3.0 installed:
Linux Build Supportand
Mac Build Support. De-select all the other checkboxes:
If you have another version of Unity, or don’t have it installed at all:
IMPORTANT: In addition to the defaults, select
Linux Build Supportand
Mac Build Support:
Install Unity into the default installation directory:
Alternatively, you can set the environment variable
UNITY_HOMEto your customized Unity installation folder. For example, if you installed Unity to
C:\Unity 2017.3.0, then set
Launch Unity and complete the registration process.
Set up Unreal
To use the Unreal SDK, you must build the Unreal engine from source:
1. Install dependencies
In a terminal, run the following command to install MSVC Redistributable (required for working with SpatialOS):
spatial setup install-dependencies --sdk-version=12.2.0 [<flags>...]
By running this command you agree with the individual terms of each separate dependency.
spatial setup install-dependencies --sdk-version=12.2.0 --helpfor more information.
Restart your computer to complete the install process.
If you don’t have it already, install Visual Studio 2015.
If you don’t have it already, install the Windows SDK 8.1.
2. Get the Unreal Engine source
To use the Unreal SDK, you need to build the Unreal Engine 4 from source. To get the source and set it up to build:
Check if you have access to the Unreal Engine 4 GitHub repository.
If you don’t, follow these instructions to get access.
Clone the repository and checkout the 4.17.1-release branch by running either of these commands in a Git bash terminal:
- via HTTPS:
git clone https://github.com/EpicGames/UnrealEngine.git -b 4.17.1-release
- via SSH:
git clone email@example.com:EpicGames/UnrealEngine -b 4.17.1-release
- via HTTPS:
Add a system environment variable (
Control Panel > System and Security > System > Advanced system settings > Advanced > Environment variables) named
The value should be the path to the directory you cloned into above. For example,
Restart your terminal and run
echo $env:UNREAL_HOME(PowerShell) or
echo %UNREAL_HOME%(cmd) to make sure that the new environment variable is registered. This should output the path to the directory you cloned into above. For example,
3. Build the Unreal Engine
To build Unreal workers for SpatialOS deployments, you need to build targeting Linux, which requires cross-compilation of your SpatialOS project and Unreal Engine.
- Follow the compiling for Linux setup guide for UnrealEngine 4.17.1, installing the Linux-x86_64 cross compile toolchain. You don’t need to follow the “Packaging for Linux” section.
- After following the Linux setup instructions, restart your terminal and run
echo $env:LINUX_MULTIARCH_ROOT(PowerShell) /
echo %LINUX_MULTIARCH_ROOT%(cmd) /
echo $UNREAL_HOME(Git Bash) to make sure that the new environment variable is registered. This should output the path to the clang directory that you installed in the previous step.
- Navigate to the directory you cloned the Unreal Engine source code into. For example,
In this folder, run the batch file
This will install prerequisites for building Unreal Engine 4.
While running the batch file, you should see
Checking dependencies (excluding Mac, Android).... If it says
excluding Linuxtoo, make sure that you set the environment variable LINUX_MULTIARCH_ROOT correctly, and run the batch file again.
In the same directory, run the batch file
This sets up the project files required to build Unreal Engine 4.
UE4.slnin Visual Studio 2015.
Build > Configuration Managerwindow, set your solution configuration to
Development Editorand your solution platform to
In the Solution Explorer, right-click on the UE4 target and select
Build(you may be prompted to install some dependencies first).
This builds Unreal Engine, which can take up to a couple of hours.
Once the build succeeds, search for
Automation Toolproject in the solution explorer, right-click it and click
You have now built UnrealEngine 4 to support cross-compilation for Linux.
4. (optional) Install the launcher
If you want to run a game client to connect to a SpatialOS game running in the cloud, you must install the Launcher.
- Download the Launcher.
- Follow the instructions in the installation wizard.
5. Next steps
You’ve now set up your machine for development with SpatialOS!
Recommended: To learn how to use SpatialOS and experiment with its main APIs, try our tutorials:
- Pirates tutorial (Unity)
- Unreal tutorial coming soon
If you’d just like to find out about what SpatialOS is:
To get started building something of your own, go to github.com/spatialos and use one of the repositories there as a starting point.