Take a sneak peak of our new documentation Read More
Last Updated: 1/3/2023, 3:07:52 AM

# Unreal Engine SDK Installation Guide

The Unreal Engine SDK acts as a bridge between your game and our services, and contains the APIs needed for the game client and game server to send requests to the AccelByte services. Our Unreal Engine SDK supports both Unreal Engine 4 and Unreal Engine 5.


Download Unreal Engine SDK

NOTE

AccelByte Cloud currently supports Unreal Engine 4 versions 4.26 and 4.27, and Unreal Engine 5 version 5.0 and 5.1.

# Download and install the Unreal Engine SDK plugin

Follow the steps below to download and install the Unreal Engine SDK plugin:

  1. Open your project with the Unreal Engine Editor.

  2. Copy the plugin folder Plugins/AccelByteUe4Sdk and paste it into your game's plugins folder.

  3. Add the following plugin to your [MyAwesomeGame].uproject file.

    "Plugins": [
    ...
    {
        "Name": "AccelByteUe4Sdk",
        "Enabled": true
    },
    ...
    
  4. Add the following plugin to your /Source/[MyAwesomeGame].Target.cs file.

    ExtraModuleNames.AddRange(new string[]
    {
        ...
        "AccelByteUe4Sdk",
        ...
    }
    
  5. Add the following plugin to your /Source/[MyAwesomeGame]Editor.Target.cs file.

    ExtraModuleNames.AddRange(new string[]
    {
        ...
        "AccelByteUe4Sdk",
        ...
    }
    
  6. Add the plugin to your /Source/MyAwesomeGame/[MyAwesomeGame].Build.cs file.

    PublicDependencyModuleNames.AddRange(
    new string[] {
        ...
        "AccelByteUe4Sdk",
        ...
    }
    

# Configure the AccelByte Cloud SDK for Unreal Engine

Before you can use the SDK, you will need to configure it using AccelByte Cloud SDK Configuration in the Unreal Editor, or directly through the JSON DefaultEngine.ini.

# Input the AccelByte Configuration in Unreal Editor

  1. Open your project with the Unreal Editor.

  2. In the top menu bar, go to Edit > Project Settings.

  3. In Project Settings, scroll down to the Plugins section and select AccelByte Unreal Engine 4 Client SDK.

    ue4-gsg

  4. Fill in Client Id, Client Secret, Namespace, Publisher Namespace, Redirect URI, Base Url, and App Id. Leave the remaining input fields empty.

    ue4-gsg

  5. Click Set as Default to save your configuration.

# Input JSON content into DefaultEngine.ini

  1. In the /Config folder, open DefaultEngine.ini.

  2. Input your information into the file using the following format:

    [/Script/AccelByteUe4Sdk.AccelByteSettings]
    ClientId=<client_id>
    ClientSecret=<client_secret>
    Namespace=<namespace>
    PublisherNamespace=<publisher_namespace>
    RedirectURI="http://127.0.0.1"
    BaseUrl=<base_url>
    AppId=<app_id>
    

    TIP

    Make sure you complete the PublisherNamespace, ClientId, ClientSecret (if applicable), Namespace, AppId, BaseURL, and RedirectUri. You can find your ClientId, ClientSecret, and Namespace settings in the AccelByte Admin Portal, or read about IAM Clients (opens new window). Contact support or your Account Manager if you are unsure of your API URLs.

# Additonal Features

AccelByte now supports additional features that you can enable in [/Script/AccelByteUe4Sdk.AccelByteSettings]. These include:

  • Client-Side Data Caching (In-Memory): you can now cache static data/files in the memory to reduce HTTP calls. To activate this feature, ensure that the service that will send the response can provide HTTP Cache Control headers.

    [/Script/AccelByteUe4Sdk.AccelByteSettings]
    ...
    bEnableHttpCache=true
    
  • Quality of Service (QoS) Scheduled Latencies Updater: this is a scheduler that runs in the background to update the latencies in all specified regions. You can specify the given time interval for the scheduler. Polling is initialized at the authentication level since the latencies need to be updated before matchmaking to eliminate bottlenecks when matchmaking starts. 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 QosLatencyPollIntervalSecs to a value greater than 0. The minimum polling interval, when active, is 10 minutes (600 seconds).
  • To enable the scheduler for other regions, set QosServerLatencyPollIntervalSecs to a value greater than 0.

You can also configure the plugin in the Editor as follows:

  1. Click Edit on the menu bar and select Project Settings.
  2. Scroll down to the AccelByte SDK category and fill in your game client credentials and the fields found in the .ini file.
  3. Any remaining fields can be left blank.

For more information, see AccelByte’s IAM Clients (opens new window) documentation.

ue4-gsg