Unreal SDK
The Unreal SDK provides a plugin for Unreal Engine game servers with both C++ and Blueprint support.Installation
Plugin Installation
- Download the Agones Unreal Plugin from Agones releases
- Extract to your project’s
Pluginsfolder: - Enable the plugin in Unreal Editor:
- Edit > Plugins
- Search for “Agones”
- Enable the plugin
- Restart the editor
Building from Source
Quick Start (C++)
GameServerManager.cpp
Quick Start (Blueprints)
- Add AgonesComponent to your GameMode or GameInstance
- In BeginPlay:
- Call Connect
- Call Ready
- Set a timer to call Health every 2 seconds
- In EndPlay:
- Call Shutdown
SDK Reference (C++)
Agones Component
Add to your Actor:Connection
Lifecycle Methods
Health Checking
Metadata
State Monitoring
Blueprint Nodes
The Unreal SDK provides Blueprint nodes for all SDK functions:- Connect - Connect to SDK server
- Ready - Mark server as ready
- Health - Send health ping
- Shutdown - Shutdown server
- Allocate - Self-allocate
- Reserve - Reserve for duration
- Set Label - Set metadata label
- Set Annotation - Set metadata annotation
- Get Game Server - Get current state
- Watch Game Server - Watch for changes
Alpha Features (Blueprints)
- Player Connect
- Player Disconnect
- Is Player Connected
- Get Connected Players
- Get Player Count
- Get Player Capacity
- Set Player Capacity
Beta Features
Counters (Blueprints)
- Get Counter
- Update Counter
Lists (Blueprints)
- Get List
- Update List
- Add List Value
- Remove List Value
Testing in Editor
Best Practices
Add AgonesComponent to GameMode or GameInstance
Add AgonesComponent to GameMode or GameInstance
This ensures it persists across level transitions.
Use timers for health checks
Use timers for health checks
Unreal’s timer system is more efficient than Tick.
Call Shutdown in EndPlay
Call Shutdown in EndPlay
Ensure cleanup when the game ends.
Check for null
Check for null
Always verify the component exists before calling methods.
Dedicated Server Build
When building for Linux server:- Set target platform to Linux
- Select Server build configuration
- Package the project
- Build Docker image with the packaged server
Next Steps
C++ SDK
For non-Unreal C++ servers
SDK Overview
Compare all available SDKs
