You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/unreal/index.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,7 @@ This tutorial assumes that you have a basic understanding of the Unreal Engine,
14
14
15
15
We’ll keep things intentionally simple: a single “Game Manager” class, minimal error handling, and hardcoded settings where convenient. This makes the SDK flow easy to see. For production, prefer Unreal’s Subsystems, move secrets out of code, follow best practices, and add proper logging/retry.
16
16
17
-
SpacetimeDB supports Unreal Engine version `5.6` or later, and this tutorial has been tested with the following Unreal versions:
18
-
-`5.6`
19
-
> REVIEW: We should be able to support 5.3+ as C++20 became the default + minimum; however current build has been on 5.6; do we want to look into earlier versions of UE, not everyone jumps on the latest for stability reasons?
17
+
SpacetimeDB supports Unreal Engine version `5.6`. This tutorial has been tested only with that version.
20
18
21
19
This tutorial is written for C++, but the SpacetimeDB Unreal client SDK also supports Blueprints! Stay tuned for a Blueprint-based tutorial.
Copy file name to clipboardExpand all lines: docs/docs/unreal/part-1.md
+51-53Lines changed: 51 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,15 +28,16 @@ In this section, we will guide you through the process of setting up a Unreal Pr
28
28
29
29
### Step 1: Create a Blank Unreal Project
30
30
31
-
SpacetimeDB supports Unreal version `5.6` or later. See [the overview](.) for more information on specific supported versions.
31
+
SpacetimeDB supports Unreal version `5.6`. See [the overview](.) for more information on specific supported versions.
32
32
33
33
Launch Unreal 5.6 and create a new project by selecting Games from the Unreal Project Browser.
34
34
35
-
> ⚠️ Important: Select the **Blank** template and in **Project Defaults** select **C++**.
35
+
> ⚠️ Important: Select the **Blank** template and in **Project Defaults** select **C++**.
36
36
37
-
For `Project Name` use `client_unreal`. For Project Location make sure that you use your `blackholio` directory. This is the directory that we created in a previous step.
37
+
For **Project Name** use `client_unreal`.
38
+
For **Project Location**, use your `blackholio` directory (created in the previous step).
- Drag and drop the `BP_GameManager` blueprint from the **Content Drawer** window into the scene view.
95
+
4.**Add to the Level**
96
+
- Drag the `BP_GameManager` blueprint from the **Content Drawer** into the scene view.
99
97
100
-
5.**Add a Directional Light**:
101
-
- Click the **Add**button in the top toolbar, and select `Lights > Directional Light`
102
-
-Update `Rotation` to -105.0, -31.0, -14.0
98
+
5.**Add a Directional Light**
99
+
- Click **Add** in the top toolbar, then select **Lights -> Directional Light**.
100
+
-Set **Rotation** to -105.0, -31.0, -14.0.
103
101
104
-
6.**Add a PostProcessVolume**:
105
-
- Click the **Add**button in the top toolbar, and select `Volumes > Post Process Volume`
106
-
- Enable and update `Exposure > Exposure Compensation` to 0.0
107
-
- Enable and update `Exposure > Min EV100` to 1.0
108
-
- Enable and update `Exposure > Max EV100` to 1.0
109
-
- Enable `Post Process Volume Settings > Infinite Extend (Unbounded)`
102
+
6.**Add a Post Process Volume**
103
+
- Click **Add** in the top toolbar, then select **Volumes -> Post Process Volume**.
104
+
- Enable and set **Exposure -> Exposure Compensation** to 0.0.
105
+
- Enable and set **Exposure -> Min EV100** to 1.0.
106
+
- Enable and set **Exposure -> Max EV100** to 1.0.
107
+
- Enable **Post Process Volume Settings -> Infinite Extend (Unbounded)**.
110
108
111
-
### Add simple GameMode
109
+
### Add a Simple GameMode
112
110
113
-
We'll need a very simple GameMode to tweak the start up settings. Let's add that now and wire it in for the World Settings.
111
+
Create a simple GameMode to tweak the startup settingsand connect it to the World Settings.
114
112
115
-
1.**Create the C++ Class**:
116
-
- Open `Tools > New C++ Class` in the top menu, select **GameModeBase** as the parent and click **Next**
117
-
- Select **Public**Class Type
118
-
- Name the script`BlackholioGameMode`
113
+
1.**Create the C++ class**
114
+
- Open **Tools -> New C++ Class** in the top menu, select **GameModeBase** as the parent, and click **Next**.
115
+
- Select **Public**as the class type.
116
+
- Name the class`BlackholioGameMode`.
119
117
120
-
2.**Create GameMode Blueprint**:
121
-
- In the **Content Drawer**, click **Add**, select `Blueprint > Blueprint Class`
122
-
- Expand **All Classes**, search for `BlackholioGameMode`, highlight it, and click **Select**
123
-
- Name the blueprint `BP_BlackholioGameMode`
118
+
2.**Create a GameMode Blueprint**
119
+
- In the **Content Drawer**, click **Add**, then select **Blueprint -> Blueprint Class**.
120
+
- Expand **All Classes**, search for `BlackholioGameMode`, highlight it, and click **Select**.
121
+
- Name the blueprint `BP_BlackholioGameMode`.
124
122
125
-
3.**Update WorldSettings**:
126
-
- Open `Window > World Settings` in the top menu
127
-
-Update GameMode Override from **None** to **BP_BlackholioGameMode**
128
-
- Save the level
123
+
3.**Update World Settings**
124
+
- Open **Window -> World Settings** in the top menu.
125
+
-Change **GameMode Override** from **None** to `BP_BlackholioGameMode`.
126
+
- Save the level.
129
127
130
-
The foundation for our Unreal project is all set up! If you press play, it will show a blank screen, but it should start the game without any errors. Now we're ready to get started on our SpacetimeDB server module, so we have something to connect to!
128
+
At this point, the foundation of the Unreal project is set up. Pressing Play will show a blank screen, but the game should start without errors. Next, we’ll create the SpacetimeDB server module so we have something to connect to.
Copy file name to clipboardExpand all lines: docs/docs/unreal/part-2.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -467,7 +467,7 @@ This will also generate a file in the `client_unreal/Source/client_unreal/Privat
467
467
468
468
### Connecting to the Database
469
469
470
-
To make sure building the Unreal project will work, let's make sure to update the `client_unreal.Build.cs` to include the SpacetimeDbSdk. Update the PublicDependencyModuleNames, and PrivateDependencyModuleNames as following for current and future needs:
470
+
Update `client_unreal.Build.cs` to include the `SpacetimeDbSdk`. Add `SpacetimeDbSdk` to `PublicDependencyModuleNames`, and confirm that `PrivateDependencyModuleNames` includes the following modules for current and future needs:
471
471
472
472
```cpp
473
473
PublicDependencyModuleNames.AddRange(new string[]
@@ -489,7 +489,8 @@ To make sure building the Unreal project will work, let's make sure to update th
489
489
});
490
490
```
491
491
492
-
At this point we can set up Unreal to connect your Unreal client to the server. We'll need to update the `GameManager.h` to the following:
492
+
Update `GameManager.h` as follows to set up the Unreal client connection to the server:
493
+
493
494
```cpp
494
495
#pragma once
495
496
@@ -505,7 +506,7 @@ class CLIENT_UNREAL_API AGameManager : public AActor
0 commit comments