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
When you call `CreateHathoraSDK` in either BP or C++, it will automatically determine the authentication configuration for the API calls based on the available configuration.
49
+
50
+
#### In Editor
51
+
52
+
While you're in the editor, it'll read from `Config/DefaultGame.ini` (see [Client Builds](#client-builds) below) by default, but you can specify both the App ID and Dev Token to be only used when in editor for testing purposes.
53
+
54
+
Go to **Edit > Project Settings > Plugins > Hathora SDK** and specify both your App ID and Dev Token here:
55
+
56
+

57
+
58
+
It's **not recommended** to press the `Set as Default` button here for security reasons, and instead manually modify the INI config files.
59
+
60
+
#### Client Builds
61
+
62
+
For the settings to be packaged in a build, you must specify them in one of the `Config/*.ini` files. Both clients and servers need the App ID so you can specify this in `Config/DefaultGame.ini`:
63
+
64
+
```ini
65
+
[/Script/HathoraSDK.HathoraSDKConfig]
66
+
AppId=app-***********************
67
+
```
68
+
69
+
**DO NOT** specify the Dev Token in this file or it will be packaged with client builds and with enough reverse engineering, you would leak a secret that can manage your whole Hathora account. We're working on a better method for this to prevent accidental credential leaks, but in the meantime, follow the [Server Builds](#server-builds) section below for the Dev Token.
70
+
71
+
#### Server Builds
72
+
73
+
The Dev Token needs to be packaged for your dedicated server to be able to make authorized calls like Get Process Info or Get Room Info. You can safely configure to package this in only the server builds by specifying it in `Config/DedicatedServerGame.ini` which is only used by unreal for the `Server` target type:
74
+
75
+
```ini
76
+
[/Script/HathoraSDK.HathoraSDKConfig]
77
+
DevToken=Ga__*********
78
+
```
79
+
46
80
### Manually calling API endpoints
47
81
48
82
The SDK provides functions that provide access to the Hathora Cloud API endpoints. You can find a list of the supported endpoints [below](#supported-cloud-api-endpoints).
@@ -171,6 +205,8 @@ The Client build will open the `Game Default Map` option.
171
205
172
206
### Packaging the Builds
173
207
208
+
Before you can package a build, make sure you have [properly set up your `Config/*.ini` files](#authentication-configuration) to ensure the App ID and Dev Token get packaged correctly and safely. The linked section goes into more detail, but you **need to make sure that Dev Token isn't specified in `Config/DefaultGame.ini`!**
209
+
174
210
Now that you have Linux cross-compilation set up on a source build of Unreal with Server and Client targets opening the correct maps on startup, you're ready to package the builds. While you can create scripts to do automate this process, you can easily build the two targets under the Platforms menu in the Editor. Once you have selected the correct target and build configuration, you can select `Package Project`. In the below images, you'll see we're packaging a Linux Server (Development) and a Windows Client (Development):
175
211
176
212

0 commit comments