The Example Project
1: Set up
To run the GDK and the Example Project, you need to:
- Sign up for a SpatialOS account (or make sure you are logged in)
- Clone the Example Project and GDK repositories
- Build and launch the Example Project
Step 1: Sign up or log in
If you have not signed up for a SpatialOS account, you can do this here.
If you have already signed up, make sure you are logged into Improbable.io. If you are logged in, you should see your picture in the top right of this page; if you are not logged in, select Sign in at the top of this page and follow the instructions.
Step 2: Clone the Example Project repository
Using the command line
- Open a command line window and navigate to a suitable directory to clone the repository to.
- Run either of these commands to clone the example project repository:
Using Github Desktop
- In GitHub Desktop, select File > Clone Repository.
- In the Clone a repository window, select URL.
- In the Repository URL field, enter this URL:
- In the Local Path field, enter a suitable directory path for this repository, or select Choose… to select a directory using File Explorer.
- Select Clone.
Image: The Github Desktop Clone a repository window
TIP: Clone the Example project into your root directory to avoid file path length errors. For example:
Step 3: Clone the GDK
Next, you need to clone the GDK into your project. To do this:
- In File Explorer, navigate to the
UnrealGDKExampleProject\Gamedirectory and create a
Pluginsfolder in this directory.
- In a terminal window, navigate to the
UnrealGDKExampleProject\Game\Pluginsdirectory and clone the GDK for Unreal repository by running either:
Step 4: Build the dependencies and launch the project
To use the Example project, you must build the GDK for Unreal module dependencies. To do this:
- Open File Explorer, navigate to the root directory of the GDK for Unreal repository (
UnrealGDKExampleProject\Game\Plugins\UnrealGDK\...), and double-click
Setup.bat. If you haven’t already signed into your SpatialOS account, the SpatialOS developer website may prompt you to sign in.
- In File Explorer, navigate to your
- Right-click on GDKShooter.uproject and select Switch Unreal Engine Version then select the Unreal Engine you cloned earlier.
Image: The Select Unreal Engine Version window
- Right-click GDKShooter.uproject and select Generate Visual Studio Project files.
- In the same directory, double-click GDKShooter.sln to open it with Visual Studio.
- In the Solution Explorer window, right-click on GDKShooter and select Build.
- When Visual Studio has finished building your project, right-click on GDKShooter and select Set as StartUp Project.
- Build and open your project in the Unreal Editor. To do this: Either press F5 on your keyboard or, in the Visual Studio toolbar, select Local Windows Debugger.
Image: The Visual Studio toolbar
Note: Ensure that your Visual Studio Solution Configuration is set to Development Editor.
Image: The Example Project in the Unreal Editor
> Next: 2: Launch a local deployment
2019-05-21 Page added with editorial review