Install the Unreal Engine SDK
Overview
You can use the AccelByte Gaming Services (AGS) Game Software Development Kit (SDK) for Unreal Engine to implement AGS in your game. The SDK acts as a bridge between your game and AGS.
Download the AGS Unreal Engine SDKPrerequisites
- Unreal Engine 4 versions 4.27, or Unreal Engine 5 up to version 5.5.1
- An AGS Game Namespace
- An AGS IAM Client
- An AGS Client ID
Tutorial
Follow this tutorial to learn how to set up our Unreal Engine SDK.
Download and install the Unreal SDK Plugin
-
Download the AGS Unreal Engine SDK and extract the zip file.
-
Copy the extracted plugin folder into your game's
Pluginsfolder (note the capital "P"). If your game doesn't have this folder yet, create a folder namedPluginsin your game project's root directory. The final structure should be[YourProject]/Plugins/accelbyte-unreal-sdk-plugin-X.X.X/. -
Add this plugin to your
[MyAwesomeGame].uprojectfile."Plugins": [
...
{
"Name": "AccelByteUe4Sdk",
"Enabled": true
}
...
] -
Add this plugin to your
/Source/[MyAwesomeGame].Target.csfile.ExtraModuleNames.AddRange(new string[]
{
...
"AccelByteUe4Sdk",
...
}); -
Add this plugin to your
/Source/[MyAwesomeGame]Editor.Target.csfile.ExtraModuleNames.AddRange(new string[]
{
...
"AccelByteUe4Sdk",
...
}); -
Add this plugin to your
/Source/MyAwesomeGame/[MyAwesomeGame].Build.csfile.PublicDependencyModuleNames.AddRange(
new string[] {
...
"AccelByteUe4Sdk",
...
}
);
Configure the Game SDK
You need to configure the SDK by inputting the JSON content into your project's DefaultEngine.ini file.
-
In the
/Configfolder, openDefaultEngine.ini. -
Input your information using the following format:
noteLeave the Publisher namespace empty.
[/Script/AccelByteUe4Sdk.AccelByteSettings]
ClientId=<client_id>
ClientSecret=<client_secret>
Namespace=<namespace>
PublisherNamespace=<>
RedirectURI="http://127.0.0.1"
BaseUrl=<base_url>
AppId=<app_id>AGS Shared CloudIf you're using AGS Shared Cloud, the URL format is
https://<Studio ID>-<Game TitleID>.prod.gamingservices.accelbyte.io.For example:
https://mystudio-myawesomegame.prod.gamingservices.accelbyte.ioOr you can download the configuration file for Unreal Engine and save the file for this installation.
You can download the configuration files in the Shared Cloud tier dashboard during setup. Later, you can also download them from the OAuth Clients page in the AccelByte Admin Portal.
AGS Private Cloud does not yet have the configuration file download option.
infoEnsure you enter the ClientId, ClientSecret (if applicable), Namespace, AppId (for Steam Games), BaseURL, and RedirectUri. Find your ClientId, ClientSecret, and Namespace settings in the AGS Admin Portal, or refer to the Access documentation.
Contact support or your Account Manager if you don't know your API URLs.
Configure dedicated server settings (Optional)
If you are implementing multiplayer services using a Dedicated Server, add the Server Settings to DefaultEngine.ini:
[/Script/AccelByteUe4Sdk.AccelByteServerSettings]
ClientId=<client_id>
ClientSecret=<client_secret>
Namespace=<namespace>
PublisherNamespace=<publisher_namespace>
RedirectURI="http://127.0.0.1"
BaseUrl=<base_url>
We highly recommend that you remove the Server Settings when building a Game Client as a shipping build. In order to do this, the following command in the PreBuildSteps in the AccelByteUe4Sdk.uplugin file needs to be set to True.
"PreBuildSteps": {
"Win64": [
"call \"$(PluginDir)\\PreBuildProcessor.bat\" \"$(EngineDir)\" \"$(ProjectDir)\" $(TargetConfiguration) $(TargetType) True"
]
}
The PostBuildSteps in the same file will revert your DefaultEngine.ini file back to its original state after the build process.
Additional features
AGS now supports additional features that you can enable in [/Script/AccelByteUe4Sdk.AccelByteSettings].
-
Client-Side Data Caching (In-Memory): You can now cache static data/files in memory to reduce HTTP calls. To activate this feature, ensure that the service sending the response can provide HTTP Cache Control headers.
[/Script/AccelByteUe4Sdk.AccelByteSettings]
...
bEnableHttpCache=true -
Quality of Service (QoS) Scheduled Latencies Updater: we created a scheduler that updates the latencies on all specified areas. This feature helps game developers implement matchmaking in multiple regions.
You can specify the time interval for the scheduler. The system initiates polling at the authentication level because it must update latencies to eliminate bottlenecks before matchmaking. Players may also want to know their region latencies (ping) before they begin matchmaking.
[/Script/AccelByteUe4Sdk.AccelByteSettings]
...
QosLatencyPollIntervalSecs=0
QosServerLatencyPollIntervalSecs=0 -
The default value for both parameters is
0. -
To enable the scheduler, set
QosLatencyPollIntervalSecsto a value greater than 0. When active, the minimum polling interval is 10 minutes. -
To enable the scheduler for other regions, set
QosServerLatencyPollIntervalSecsto a value greater than 0.
Open your project
Open your project with the Unreal Editor. The AGS SDK plugins should now be loaded and ready to use.
Congratulations! You successfully configured the AGS SDK for Unreal Engine.