Game > Gamebase > User Guide for Unreal SDK > Getting Started

This document describes the environment and initial setting to enable Unreal Gamebase SDK.

Environments

[Note]

Support Versions for Unreal

  • UE 4.27~UE 5.7
  • To get support for another version of Unreal, please contact Customer Center.

Supported Platforms

  • Android
  • iOS
  • Windows

When unsupported Gamebase API is called on a selected platform, errors like below are returned as callback; if a callback is not available, warning logs show as output.

  • GamebaseErrorCode::NOT_SUPPORTED
  • GamebaseErrorCode::NOT_SUPPORTED_ANDROID
  • GamebaseErrorCode::NOT_SUPPORTED_IOS
  • GamebaseErrorCode::NOT_SUPPORTED_UE_STANDALONE
  • GamebaseErrorCode::NOT_SUPPORTED_UE_EDITOR

Platforms supported by each API can be categorized by the following icon:

API

Supported Platforms UNREAL_ANDROID UNREAL_IOS UNREAL_WINDOWS

Dependencies

Installation

  1. Download Unreal Gamebase SDK and create a folder named Plugins in the project path and add NHN Cloud Folder in the downloaded SDK.
  2. From the Unreal editor, display the Settings > Plugins window, and find and enable Project > NHN Cloud > Gamebase Plugin.

  3. Download Gamebase Unreal SDK

Module Settings

  • To use the Gamebase code, you need to add modules as shown below when setting up dependencies in the module's Build.cs file.
    PrivateDependencyModuleNames.AddRange(
        new[]
        {
            "Gamebase",
        }
    );
    

Android Settings

  1. Select Edit > Project Settings from the editor menu.
  2. In the Project Settings window, under Plugin category, select Gamebase - Android.

Unreal Project Settings - Android

  • Authentication
    • Activate the IdP to use.
    • To use Hangame IdP, please contact our Customer Center.
    • GPGS(Google Play Games Services)
      • Auto Login - Supports GPGS auto-login
  • Purchase
    • Select the store to use.
    • ONE Store
      • Select View Option - Full payment screen (Full) or Payment popup window (Popup).
  • Push
    • Enable the push service to use.
    • FCM

An issue where Google Play authentication and payment does not complete

Processing the authentication and payment for the Google Play service requires Distribution settings. To find out more, see the following document.

GPGS (Google Play Services) Settings

When using Sign in with Apple, enter the Application ID of GPGS by adding the following to the /Config/Android/AndroidEngine.ini file in the project.

[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]
GamesAppID=

Enable AndroidX

  • From Gamebase Android SDK 2.25.0, AndroidX has been introduced. Therefore, you must add the following setting to the UPL (Unreal Plugin Language) file.
<gradleProperties>    
  <insert>
    android.useAndroidX=true      
    android.enableJetifier=true    
  </insert>  
</gradleProperties>

Enable multidex

  • From Gamebase Unreal SDK 2.26.0, the multidex-related setting within Gamebase has been removed. Therefore, you must add the following setting to the UPL (Unreal Plugin Language) file.
<buildGradleAdditions>
  <insert>
  android {
    defaultConfig {
      multiDexEnabled true
    }
  }
  </insert>
</buildGradleAdditions>

<androidManifestUpdates>
    <addAttribute tag="application" name="android:name" value="androidx.multidex.MultiDexApplication"/>
</androidManifestUpdates>

Epic Games Service

iOS Settings

To use the Gamebase SDK for Unreal, UE4 Github source code has to be used, and the Github account must be linked after joining the Epic games in order to expose the UnrealEngine repository. See below for relevant guides.

!Important If you ignore this process, the following guide link does not properly work and the Gamebase SDK for Unreal will become unavailable.

Project Settings

  1. Select the editor menu Edit > Project Settings.
  2. In the Project Settings window, select Gamebase - iOS from the Plugin category.

Unreal Project Settings - iOS

  • Path
    • Xcode Path: Enter the path of Xcode. (default: /Applications/Xcode.app)
  • Info.plist
    • Disable Auto Info.plist Update: Disable automatic Info.plist updates based on Project Settings.
    • Enable Contact (Privacy Permissions): Add descriptions for Camera, Photo Library, and Microphone permissions to Info.plist to enable file attachments in the Customer Center.
    • Enable Tracking Description: Add the NSUserTrackingUsageDescription key to Info.plist to request App Tracking Transparency permission.
  • Authentication
    • Activate the IdP you wish to use.
    • Additional configuration requirements for each IdP are as follows:
      • Facebook: FacebookAppId, FacebookClientToken, FacebookDisplayName
      • Google: GoogleClientId, GoogleReservedClientId
      • Weibo: WeiboAppKey
  • Purchase
    • Select the store to use.
  • Push
    • Enable the push service to use.

Modify the Engine to Use the Gamebase Unreal SDK

To compile frameworks developed in swift from the Gamebase Unreal SDK and external authentication SDKs, you need to add the code below in the Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSToolChain.cs file.

// need to tell where to load Framework dylibs
Result += " -rpath /usr/lib/swift";                 // Additional code
Result += " -rpath @executable_path/Frameworks";

Sign in with Apple

When using Sign in with Apple, add the following to the /Config/IOS/IOSEngine.ini file in your project

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bEnableSignInWithAppleSupport=True

Remote Notification

  1. To enable Gamebase Remote Notification, go to Project Settings > Platforms > iOS and activate Enable Remote Notifications Support. (available only on Github sources)
  2. To receive the Foreground push notification, the code shown below must be removed from the Engine/Source/Runtime/ApplicationCore/Private/IOS/IOSAppDelegate.cpp file, or

    - (void)userNotificationCenter:(UNUserNotificationCenter *)center
        willPresentNotification:(UNNotification *)notification
            withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
    {
        // Received notification while app is in the foreground
        HandleReceivedNotification(notification);
    
        completionHandler(UNNotificationPresentationOptionNone);
    }
    

    modify it as follows:

    // AS-IS
    completionHandler(UNNotificationPresentationOptionNone);
    
    // TO-BE
    completionHandler(UNNotificationPresentationOptionAlert);
    

Rich Push Notification

Cannot use the Rich Push Notification function due to the following issues:

Error in Unreal Builds due to Warning Messages of iOS SDK

If a warning message from iOS SDK is converted as error for Unreal build, leading into failure in the buildup, handle the clang compile option code of the following file as footnotes: Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSToolChain.cs

// Result += " -Wall -Werror";

PLCrashReporter

There is an issue where the device using the architecture cannot get the memory address because the PLCrashReporter used by UE4 does not support the arm64e architecture.

Game developers using the crash analysis of the NHN Cloud Log & Crash Search must refer to the following guide to modify the UE4 internal PLCrashReporter:

  1. Unzip the GamebaseSDK-Unreal/Source/Gamebase/ThirdParty/IOS/plcrashreporter.zip file.
  2. Replace the file and header file of the UE4 internal PLCrashReporter with the unzipped file.
    • Engine/Source/ThirdParty/PLCrashReporter/plcrashreporter-master-xxxxxxx

Epic Games Service

Windows Settings

  1. Select Edit > Project Settings from the editor menu.
  2. In the Project Settings window, in the Plugin category, select Gamebase - Windows.

Unreal Project Settings - Windows

  • Authentication
    • Activate the IdP to use.
  • Purchase
    • Select the store to use.
    • Epic Games Store
      • Enter the EOS service information as appropriate for each field.
    • Steamworks
      • Enter the Steamworks service information as appropriate for each field.

WebView Plugin

  • Plugin activation is required when using content that utilizes WebView.
    • GameNotice
    • ImageNotices
    • WebView
  • To use WebView-related features without modifying the engine, open the Settings > Plugins window in the Unreal Editor, find the Project > NHN Cloud > NHNWebView plugin, and activate it.
  • When using the engine's built-in Web Browser plugin, certain features may not function correctly depending on the internal CEF version and the plugin's capabilities.

[Caution]

The NHNWebView plugin and the Web Browser plugin cannot be used concurrently, and if both are enabled, an error will occur at build time.

Epic Games Service

Steamworks Services

  • Steam authentication and payment on Windows is proceeded through the Steamworks SDK.
  • The version of Steamworks used by Gamebase is 1.57 or later, so if you are using UE 5.3 or earlier, you need to update Steamworks.
  • Internally, if OnlineSubsystemSteam.bEnabled is set to true in Engine.ini, it is considered that Online Subsystem Steam is being used. In all other cases, if the Steamworks version required by Gamebase is met, the Steamworks module will be used automatically.
    [OnlineSubsystemSteam]
    bEnabled=True
    

[Caution]

When using Steamworks alone without the Online Subsystem Steam, Gamebase will only get the credentials for using Steamworks inside Gamebase and will not go through the Steamworks SDK process. When applying the Steamworks SDK directly, you need to implement your own processing for required processes like initialization, updates, and shutdowns.

3rd-Party Provider SDK Settings

Epic Games

  • To use Epic Games features, you must log in using the Epic Online Services (EOS) SDK.
  • If the Online Subsystem EOS plugin is enabled and OnlineSubsystemEOS.bEnabled is set to true in Engine.ini, the system will consider that Online Subsystem EOS is being used.

    [OnlineSubsystemEOS]
    bEnabled=True
    
  • The EOS SDK uses the module located at Engine/Source/ThirdParty/EOSSDK within the engine path.

    • When updating the EOS SDK, make sure to update it appropriately for each required platform within this module.
      • Windows: The minimum supported version is 1.15.5, and up to version 1.16.3 has been verified.
      • Android, iOS: Verified up to version 1.17.0-CL39599718.
    • To support PersistentAuth type among Login Credential Type in Online Subsystem EOS, code modification is required in UE 4.27.

      • Open the UserManagerEOS.cpp file within the OnlineSubsystemEOS module, and locate the conditional statement that compares the string value of AccountCredentials.Type inside the FUserManagerEOS::Login method. You need to add code to support PersistentAuth login in that section.
        else if (AccountCredentials.Type == TEXT("persistentauth"))
        {
            // Use locally stored token managed by EOSSDK keyring to attempt login.
            Credentials.Type = EOS_ELoginCredentialType::EOS_LCT_PersistentAuth;
            Credentials.Id = nullptr;
            Credentials.Token = nullptr;
        }
        
    • A build error occurs when using Online Subsystem EOS with Unreal Engine 4.27, so modifications are required.

      A build error occurs because including the OnlineSubsystemEOS.h header to obtain the EOS SDK handle causes issues. Therefore, it is necessary to move the header file from the Private folder to the Public folder within the OnlineSubsystemEOS plugin. (Note: Inquiry regarding EOS error) - SocketSubsystemEOS.h - EOSSettings.h - EOSHelpers.h - [Platform]/[Platform]EOSHelpers.h * If Online Subsystem EOS is not used, you must initialize EOS using the EOSSDK module and configure the platform handle for the EOS SDK. * Gamebase only calls the necessary functions based on Epic Games authentication and store settings, so the required EOS SDK lifecycle must be managed directly in the game. * Add a module for setting platform handles

          PrivateDependencyModuleNames.AddRange(
              new[]
              {
                  "GamebaseSharedEOS"
              }
          );
      
      • Setting platform handles
        #include "GamebaseSharedEOS.h"
        
        void USample::SetEosPlatformHandle(UGameInstance* GameInstance, EOS_HPlatform PlatformHandle)
        {
            if (const auto GamebaseSharedEOS = UGameInstance::GetSubsystem<UGamebaseSharedEOS>(GameInstance))
            {
                // After initializing the EOS SDK, retrieve the platform handle and pass it to the Gamebase SDK
                GamebaseSharedEOS->SetPlatformHandle(PlatformHandle);
            }
        }
        
    • When supporting Android, you must register the corresponding values in the EOSSDK_strings.xml file within the EOSSDK module in the engine, referring to the EOS SDK Guide in order to receive login responses.

      <?xml version="1.0" encoding="utf-8"?>
      <resources>
          <!-- EOS SDK requires the Client ID to be in lowercase. -->
          <string name="eos_login_protocol_scheme">eos.yourclientidhere</string>
      </resources>
      

API Deprecate Governance

APIs that are no longer supported by Gamebase are to be deprecated. Once deprecated, APIs might be deleted without previous notice if they fulfill the following conditions:

  • Updated more than 5 times for a minor version

    • Gamebase Version Format - XX.YY.ZZ
      • XX : Major
      • YY : Minor
      • ZZ : Hotfix
  • At least 5-month old

TOP