How to upgrade to SpatialOS 13.0
This page explains how to upgrade a project from SpatialOS 12 to 13.0. If you are new to SpatialOS and plan to develop on Unity or Unreal, we recommend you use the GDK for Unity or the GDK for Unreal.
If you’re already using the SDK for Unity or Unreal
As of SpatialOS 13.0, SpatialOS no longer includes the Unity and Unreal SDKs. The Unity and Unreal SDKs are now released separately and hosted on GitHub.
If you upgrade to 13.0, you’ll need to migrate to the GitHub-hosted SDKs.
For instructions, see:
- Guide to migrating your project to the GitHub-hosted SDK for Unity 1.0.0
- Guide to migrating your project to the GitHub-hosted SDK for Unreal 1.0.0
If you’re not already using the SDK for Unity or Unreal
Background
SpatialOS projects are developed against a specific version of the SpatialOS SDK.
The SDK version your project builds against is defined in the spatialos.json
file at the root of the project, in the sdk_version
field.
You must upgrade through major SDK versions in order. For example, to
upgrade from 11.2.1
to 13.0.0
, you must upgrade to 12
, then to 13.0.0
.
To find upgrade guides for older versions, look at the documentation for that version of
SpatialOS.
Upgrade steps
Note: It’s very important you start by running
spatial clean
. Otherwise, intermediate files won’t be cleaned up properly and may cause issues with the new version.
- Open a terminal in the root directory of your project.
- Run
spatial clean
. - Open the
spatialos.json
file at the root of your project. - Replace the
sdk_version
value and theversion
value of all dependencies with13.0.0
. - Replace all other instances of the version number in the file.
Run
spatial worker build
.Apart from the SDK split, there aren’t any changes in SpatialOS 13.0, so this command should succeed as usual.
You’ve now upgraded to SpatialOS 13.0.