Install the AGS OSS for Unreal Engine
Overview
The AccelByte Gaming Services (AGS) Online Subsystem (OSS) is the high-level bridge between Unreal Engine (UE) and AGS that comprises interfaces to access AGS and its features. The AGS OSS is designed to handle higher-level logic with asynchronous communication and delegates, making it easier to integrate AGS features into your Unreal Engine game.
Prerequisites
- Unreal Engine: 4.27, or Unreal Engine 5.00 up to version 5.6
- An AGS Game Namespace
- An AGS IAM Client
- An AGS Client ID
See the following table for information about the UE versions supported by AGS OSS:
| AGS OSS version | UE 4.27 | UE 5.0 | UE 5.1 | UE 5.2 | UE 5.3 | UE 5.4 | UE 5.5 | UE 5.6 |
|---|---|---|---|---|---|---|---|---|
| Versions up to 0.5.9 | ✔ | ✖ | ✖ | ✖ | ✖ | ✖ | ✖ | ✖ |
| Version 0.6.0 up to 0.7.9 | ✔ | ✔ | ✖ | ✖ | ✖ | ✖ | ✖ | ✖ |
| Version from 0.8.0 up to 0.11.4 | ✔ | ✔ | ✔ | ✖ | ✖ | ✖ | ✖ | ✖ |
| Version from 0.11.5 up to 0.11.26 | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✖ | ✖ |
| Version from 0.11.27 up to 0.12.14 | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ | ✖ |
| Version from 0.12.15 up to 0.12.28 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ | ✖ |
| Version from 0.12.29 up to 0.13.6 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✖ |
| Version from 0.13.7 and later | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
Using AGS OSS compared to the Game SDK
The AGS OSS and Game SDK have some overlapping functions, but have very distinct characteristics:
- The OSS is a higher-level API layer used to integrate AGS to games where complex flows are handled by the OSS. The OSS can be used out of the box and doesn't need to implement the flow again.
- The Game SDK is a low-level API layer only used to call backend APIs like HTTP and Websocket, and only has small logic inside it. When used directly, the SDK needs wrappers on top of the SDK layer.
They can be differentiated further by the following:
OSS
-
Pros
- Provides an out-of-the-box solution
- Wraps game console functionalities
- Provides the ability to access the SDK layer by using ApiClient
-
Cons
- Has higher footprint/overhead
- Does not have Blueprints support
SDK
-
Pros
- Has smaller footprint/overhead
- Has Blueprints support
-
Cons
- Requires wrappers to implement complex features
- Requires additional code and plugins to implement game console functionalities
Tutorial
Follow this tutorial to learn how to set up the AGS OSS for Unreal Engine.
Download and install the required plugins
-
Download:
- AGS Unreal Engine OSS
- AGS Unreal Engine SDK, a library that provides APIs for the game client and game server to send requests to AccelByte services.
- AGS Unreal Engine Network Utilities, a library that provides networking functionalities for peer-to-peer (P2P) communication between game clients.
-
Extract the downloaded zip files.
-
Create a directory at
[project root]/Plugins/AccelByte/. -
Copy the extracted
OnlineSubsystemAccelBytefolder from the OSS zip into theAccelBytedirectory. -
Create a directory named
AccelByteUe4SdkunderAccelByte/, then copy the extracted contents from the SDK zip into that directory. -
Create a directory named
AccelByteNetworkUtilitiesunderAccelByte/, then copy the extracted contents from the Network Utilities zip into that directory. -
The project will have the following structure:
Root/
├── Config/
├── Content/
├── ...
└── Plugins/
└── AccelByte/
├── OnlineSubsystemAccelByte/
│ └── ...
├── AccelByteNetworkUtilities/
│ ├── Resource/
│ │ └── ...
│ └── Source/
│ └── ...
└── AccelByteUe4Sdk/
├── Config/
│ └── ...
├── Content/
│ └── ...
├── Resource/
│ └── ...
└── Source/
└── ...
Configure the .uproject file
Add the required plugins to your [MyAwesomeGame].uproject file:
"Plugins": [
...
{
"Name": "AccelByteUe4Sdk",
"Enabled": true
},
{
"Name": "OnlineSubsystemAccelByte",
"Enabled": true
},
{
"Name": "AccelByteNetworkUtilities",
"Enabled": true
}
...
]
Configure the Target.cs files
-
Add the modules to your
/Source/[MyAwesomeGame].Target.csfile:ExtraModuleNames.AddRange(new string[]
{
...
"AccelByteUe4Sdk",
"OnlineSubsystemAccelByte",
"AccelByteNetworkUtilities",
...
}); -
Add the modules to your
/Source/[MyAwesomeGame]Editor.Target.csfile:ExtraModuleNames.AddRange(new string[]
{
...
"AccelByteUe4Sdk",
"OnlineSubsystemAccelByte",
"AccelByteNetworkUtilities",
...
});
Configure the Build.cs file
Add the modules to your /Source/MyAwesomeGame/[MyAwesomeGame].Build.cs file:
PublicDependencyModuleNames.AddRange(
new string[] {
...
"AccelByteUe4Sdk",
"AccelByteNetworkUtilities",
"OnlineSubsystemAccelByte",
...
}
);
Configure the OSS
-
Follow the Configure the Game SDK section to configure the AccelByte Game SDK settings in your
DefaultEngine.inifile. -
Add the AGS OSS configuration to your
Config/DefaultEngine.inifile:[OnlineSubsystem]
DefaultPlatformService=AccelByte
; Specifies the name of the platform-specific OSS (e.g., Steam, PS5, Xbox)
NativePlatformService=
[OnlineSubsystemAccelByte]
bEnabled=true
; Specifies to automatically connect to Lobby WebSocket after login
bAutoLobbyConnectAfterLoginSuccess=true
[/Script/AccelByteNetworkUtilities.IpNetDriverAccelByte]
NetConnectionClassName=AccelByteNetworkUtilities.IpConnectionAccelByte -
Enable the AGS NetDriver by adding the following to your
Config/DefaultEngine.inifile:Play-In-Editor LimitationThe AccelByte NetDriver (IpNetDriverAccelByte) has a limitation when running in Play-In-Editor (PIE) mode. It only supports "Play Standalone" Net Mode. When using other PIE modes, you may encounter issues such as NULL subsystem references or see the warning "LogAccelByteOSS: Warning: AccelByte API disabled!" in the output log.
For best results, either use "Play Standalone" mode or run the game in a standalone process.
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/AccelByteNetworkUtilities.IpNetDriverAccelByte",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")
+NetDriverDefinitions=(DefName="DemoNetDriver",DriverClassName="/Script/Engine.DemoNetDriver",DriverClassNameFallback="/Script/Engine.DemoNetDriver")
Configure platform-specific settings
Edit your platform-specific config.ini file located inside your platform's folder. For example, Config/Windows/WindowsEngine.ini.
[OnlineSubsystem]
NativePlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
bUseSteamNetworking=false
SteamDevAppId=<game_app_id>
Replace Steam with your platform's OSS name if you're using a different platform (e.g., PS5, Xbox).
Open your project
Open your project with the Unreal Editor. The AGS OSS plugins should now be loaded and ready to use.
Next steps
Now that you have installed and configured the AGS OSS for Unreal Engine, you can start using the OSS interfaces to integrate AGS features into your game. For more information about using the AGS OSS, see the AGS OSS for Unreal Engine guide.
Congratulations! You successfully configured the AGS OSS for Unreal Engine.