hathora-unreal-sdkHathoraGameInstanceHostPlugin
gameServerZone to desired region
HathoraGameInstanceHostPlugin plugin
Download plugin code here
Add plugin file to project
Add maven dependency for Hathora Java SDK to 5-ext/ext/pom.xml
<dependency>
<groupId>dev.hathora</groupId>
<artifactId>cloud-sdk</artifactId>
<version>2.11.3</version>
</dependency>
Setup config values for Hathora AppId and DevToken
hathoraAppIdhathoraDevToken (encrypted) - this should be your Hathora API token
pluginConfigs:
GameInstanceService.gameInstanceHostPlugin:
class: "demo.gameinstance.HathoraGameInstanceHostPlugin"
config:
hathoraAppId: ""
hathoraDevToken: ""
With this step, servers should be spun up for matches
HathoraGameInstanceHostPlugin
There are multiple ways to integrate with Hathora APIs:
Add init script or game server logic to request info from Hathora API and callback to Pragma
host:port) for your server process
HATHORA_HOSTNAME and HATHORA_DEFAULT_PORT.
host:port) as well as other server detailsroomId and roomConfig)
HATHORA_INITIAL_ROOM_CONFIG.
roomId and roomConfig)roomConfig data to callback to PragmaHathoraGameInstanceHostPlugin.kt added to path: platform/5-ext/ext/src/main/kotlin/demo/gameinstance/platform/5-ext/ext/pom.xml
/5-ext/config/local-dev.yml