Amazon GameLift Servers SDK for Unreal Engine
The Amazon GameLift Servers SDK for Unreal Engine is compatible with UE5 versions (5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7), and supports development and packaging of game servers for Windows or Linux, as well as game clients for any Unreal-supported platform. The SDK supports both x64 and ARM architectures, with ARM architecture being supported starting from Unreal Engine version 5.0 and above.
Install the SDK for Unreal Engine
Follow these steps to set up the SDK for Unreal Engine and add it to your Unreal Engine editor.
Step 1: Install prerequisites
You’ll need the following tools to install and run the plugin with your Unreal projects.
- An AWS account to use with Amazon GameLift Servers. To use the plugin guided workflows, you need a user profile with your AWS account and access credentials. See Set up an AWS account for help with these steps:
- Sign up for an AWS account.
- Create a user with permissions to use Amazon GameLift Servers.
- Set up programmatic access with long-term IAM credentials.
- A source-built version of the Unreal Engine editor. You need a source-built editor to package a multiplayer game server build. See these Unreal Engine documentation topics:
- Accessing Unreal Engine source code on GitHub (requires GitHub and Epic Games accounts).
- Building Unreal Engine from Source
- A multiplayer game project with C++ game code. (Blueprint-only projects aren’t compatible with the plugin.) If you don’t have a project in progress, use one of the Unreal Engine sample games such as the Third Person Template.
If you're starting a new Unreal project, create a game using the Third Person template and use the following settings:
- C++
- With starter content
- Desktop
- Custom project name (examples in this README use the name
GameLiftUnrealApp)
- Microsoft Visual Studio 2019 or newer.
- Unreal Engine cross-compiling toolchain. This tool is required only if you’re building a Linux game server.
Step 2: Get the plugin
-
Download the plugin
GameLift-Cpp-ServerSDK-UnrealPlugin-<version>.zipfrom the repository’s Releases page or clone the repository if you plan to customize it. -
If you downloaded the plugin from the Releases page, unzip the downloaded file
GameLift-Cpp-ServerSDK-UnrealPlugin-<version>.zip. -
If you cloned the repository, run the following command in the root directory of the repository:
For Linux or Max:
chmod +x setup.sh sh setup.shFor Windows:
powershell -file setup.ps1Once completed, the plugin is ready to be added to an Unreal game project.
Step 3: Add the plugin to your Unreal game project
- Locate the root folder of your Unreal game project. Look for a subfolder named
Plugins. If it doesn’t exist, create it. - Copy the entire
GameLiftServerSDK/folder, either from this repository (after running the setup script) or from the unzipped release bundle, into thePluginsfolder in your game project. - Open the
.uprojectfile for your game project. Add theGameLiftServerSDKto thePluginssection:"Plugins": [ ...... { "Name": "GameLiftServerSDK", "Enabled": true } ] - In a file browser, select the game project
.uprojectfile and choose the option Switch Unreal Engine Version. Set the game project to use the source-built Unreal Editor (as mentioned in Step 1). - (Windows) In the game project root folder, right-click the
.uprojectfile and choose the option to generate project files. Open the solution (*.sln) file and build or rebuild the project.
Next steps: Integrate your game server and deploy for hosting
After you add the server SDK to your game project, see these Amazon GameLift Servers documentation topics for help with integrating your game code and preparing your game server to work with Amazon GameLift Servers.
- Configure your game project for the server SDK
- Integrate Amazon GameLift Servers functionality into your game server code
- Package your game build files
- Set up local testing with an Anywhere fleet
- Deploy your game server to the cloud with managed EC2
- Deploy your game server to the cloud with managed containers
Metrics
This telemetry metrics solution enables the feature to collect and ship telemetry metrics from your game servers hosted on Amazon GameLift Servers to AWS services for monitoring and observability. For detailed setup and usage instructions, see METRICS.md.
Troubleshoot plugin installation
Issue: When rebuilding the game project’s solution file after adding the plugin, I get some compile errors.
Resolution: Add the following line to your <ProjectName>Editor.Target.cs file to disable adaptive unity build, which may cause conflicts:
bUseAdaptiveUnityBuild = false;
Metrics
The Amazon GameLift Servers SDK for Unreal Engine provides a comprehensive metrics system for collecting and sending custom metrics from your game servers to Amazon GameLift. These metrics can be integrated with various visualization and aggregation tools including Amazon Managed Grafana, Prometheus, Amazon CloudWatch, and other monitoring platforms.
See below for a simple usage guide and see CUSTOM_METRICS.md for a detailed API description.
Quick Start
Initialize the GameLift Metrics SDK
- Include GameLiftMetrics.h at the top of your game mode source.
#include "GameLiftMetrics.h" - Initialize the GameLift Metrics SDK
FGameLiftGenericOutcome InitSdkOutcome = GameLiftSdkModule->InitSDK(ServerParametersForAnywhere);
// Initialize the GameLift metrics SDK
FGameLiftMetricsModule::Load().Initialize();
if (InitSdkOutcome.IsSuccess())
{
UE_LOG(GameServerLog, SetColor, TEXT("%s"), COLOR_GREEN);
UE_LOG(GameServerLog, Log, TEXT("GameLift InitSDK succeeded!"));
UE_LOG(GameServerLog, SetColor, TEXT("%s"), COLOR_NONE);
}
else
...
