Keep your GDK up to date
To use the SpatialOS GDK for Unreal, you need software from two git repositories:
- The SpatialOS Unreal Engine fork
- The GDK
You download both of these as part of the Get started steps.
To ensure you benefit from the most up-to-date functionality, always develop your game on the latest version of the software by regularly updating it. Whenever you update your GDK software, you must also update your SpatialOS Unreal Engine fork software. If you don’t, you might get errors from them being out of synch.
We recommend that you update your version of the GDK and SpatialOS Unreal Engine fork every week. To do this, follow the steps below.
Step 1: Ensure you’re on the release branches
If you followed our Get started guide, you have these repositories cloned on your computer.
- Your
UnrealEngine
repository should have the branch ending with-SpatialOSUnrealGDK-release
checked out. - Your
UnrealGDK
repository should have therelease
branch checked out.
You can find out which branch you have checked out by following the instructions below:
- In a terminal of your choice, change directory to the root of the repository.
- Run
git status
. This should returnOn branch *-SpatialOSUnrealGDK-release
in yourUnrealEngine
repository andOn branch release
in yourUnrealGDK
repository.
If it returns a different branch, rungit checkout <branch-name>
to check out the branch that you want.
For more information about the different GDK branches and their maturity, see the Versioning scheme page.
Step 2: Update your Unreal Engine fork and plugin
Before you begin, read the release notes on the releases page of the UnrealGDK
GitHub so you understand the changes that you’re about to download.
To update your Unreal Engine fork and GDK to the latest version, complete the following steps:
- In a terminal, change directory to the root of
UnrealEngine
. - Run
git pull
to update your Unreal Engine. - In a terminal, change directory to the root of
UnrealGDK
. - Run
git pull
to update your GDK. - Open File Explorer, navigate to the root directory of the Unreal GDK repository, and then double-click
Setup.bat
. You might be prompted to sign into your SpatialOS account if you have not signed in yet. - In File Explorer, navigate to the
<GameRoot>
directory that contains your project’s.uproject
file.
Right-click on your.uproject
file and select Generate Visual Studio project files. - In File Explorer, navigate to
<GameRoot>\Content\Spatial
and deleteSchemaDatabase.uasset
. This is necessary because some GDK upgrades change how we handle schema, and this sometimes invalidates previously generated schema.
You are now on the latest GDK and the latest SpatialOS Unreal Engine fork.
Optional: upgrade your clang version
If you’re also upgrading your Unreal Engine version, you need to ensure you have the up to date version of Linux cross-compilation (clang), for SpatialOS to be able to build targeting Linux (for cloud deployments).
- Check which version of clang corresponds to your Engine version and download it
- Ensure the
LINUX_MULTIARCH_ROOT
environment variable is set to the new clang folder - Run
GenerateProjectFiles.bat
in the engine - Build the Engine
- In your project, right click on .uproject file and
Generate Project Files
again - Build the project
Be sure to join the community on our forums or on Discord. We announce GDK versions there.
——
2019-07-31 Page updated with limited editorial review