Unreal SDK

Prev Next

Available in Classic and VPC

This page describes how to use GAMEPOT Unreal SDK for developing games in Unreal. You can integrate the game and dashboard by installing the SDK and configuring the environment.

The recommended specifications required to use the GAMEPOT SDK for Unreal are as follows:

  • Minimum specifications: Unreal 4.26 or later

Install SDK and configure environment

You can install the GAMEPOT Unreal SDK, configure the environment, and link the game and GAMEPOT dashboard to use features required for the game development.

SDK installation

The following describes how to install GAMEPOT Unreal SDK and configure a project in Unreal.

  1. Click the download link from Download GAMEPOT SDK > Unreal.

Set Android environment

To develop Android-based games using GAMEPOT Unreal SDK, you need to set up the required environment for it.

Set minimum specifications

Use the following code to set up minimum specifications for installing and running the app.

minSdkVersion: API 19 or later (Kitkat)

Edit GamePot_Android_UPL.xml

To edit the GamePot_Android_UPL.xml file to set up the Android environment, open the downloaded $S(PluginDir)/GamePot_Android_UPL.xml file in Unreal, and then edit the input value of code by referring to the table.

  • (optional)If you're not using the value, then delete the corresponding line.

    Value Description
    gamepot_project_id Project ID issued from GAMEPOT
    gamepot_store Store value (google or one or galaxy)
    gamepot_app_title App title (FCM)
    gamepot_push_default_channel Default channel name registered - Do not change.
    facebook_app_id App ID acquired from the Facebook console
    fb_login_protocol_scheme fb[App ID issued by Facebook] e.g., fb101010
    gamepot_naver_clientid Get from the NAVER developer console
    gamepot_naver_secretid Get from the NAVER developer console
    gamepot_line_channelid Get from the LINE developer console
    gamepot_twitter_consumerkey Get from the Twitter developer console
    gamepot_twitter_consumersecret Get from the Twitter developer console
    gamepot_elsa_projectid Project ID when using NAVER Cloud ELSA
    gamepot_region Type “sg” only when the GAMEPOT Dashboard creation Region is Singapore.
    gamepot_license_url Enter https://gamepot.apigw.ntruss.com/fw/jp-v1 only if the GAMEPOT dashboard creation Region is Japan.
    <buildGradleAdditions>
        <insert>
    ...
    android {
        ...
        defaultConfig {
            ...
             resValue "string", "gamepot_project_id", ""                                      // required
             resValue "string", "gamepot_store", "google"                                   // required
             resValue "string", "gamepot_app_title","@string/app_name"           // required (fcm)
             resValue "string", "gamepot_push_default_channel","Default"        // required (fcm)
             resValue "string", "facebook_app_id", ""                                           // optional (Facebook)
             resValue "string", "fb_login_protocol_scheme", ""                           // optional (Facebook)
             resValue "string", "gamepot_naver_clientid", ""                               // optional (acquire from the NAVER developer console)
             resValue "string", "gamepot_naver_secretid", ""                              // optional (acquire from the NAVER developer console)
             resValue "string", "gamepot_line_channelid",""                               // optional (acquire from the LINE developer console)
             resValue "string", "gamepot_twitter_consumerkey", ""                   // optional (acquire from the Twitter developer console)
             resValue "string", "gamepot_twitter_consumersecret", ""               // optional (acquire from the Twitter developer console)
             resValue "string", "gamepot_elsa_projectid", ""                              // optional (NAVER Cloud ELSA project ID
             resValue "string", "gamepot_region", "" // Caution! Only if the gamepot region is Singapore , value as sg
        }
        ...
    }
      </insert>
    </buildGradleAdditions>
    

Set push notification icon

You can set icons to display in the notification bar when receiving push messages. If you don't set it up separately, then the default image included in the SDK is used. You can set up icons that suit the game.
If you create it using Android Asset Studio, it is convenient as the images are generated for each folder automatically.

The following describes how to set push notification icons.

  1. As shown below, create each res/drawable folders in the project path, and add image files for each size.

    Folder name Capacity
    $S(PluginDir)/ThirdParty/Android/GamePotResources/res/drawable-mdpi/ 24x24
    $S(PluginDir)/ThirdParty/Android/GamePotResources/res/drawable-hdpi/ 36x36
    $S(PluginDir)/ThirdParty/Android/GamePotResources/res/drawable-xhdpi/ 48x48
    $S(PluginDir)/ThirdParty/Android/GamePotResources/res/drawable-xxhdpi/ 72x72
    $S(PluginDir)/ThirdParty/Android/GamePotResources/res/drawable-xxxhdpi/ 96x96
  2. Rename the image file to ic_stat_gamepot_small.

iOS Preferences

To develop iOS-based games using GAMEPOT Unreal SDK, you need to set up the required environment for it.

Upon building, the Version Code must increase in a unique form of whole numbers.

Configure project

The following describes how to configure a project to set up the iOS environment.

  1. Add the GoogleService-Info.plist file acquired from the Google Firebase console to the Unreal project.

  2. Edit the following settings from the project's GamePotConfig-Info.plist file by referring to the table.

    Environment variables Description
    gamepot_project_id Project ID issued from GAMEPOT
    gamepot_facebook_app_id App ID acquired from Facebook
    gamepot_facebook_display_name Name displayed in Facebook
    gamepot_google_app_id GoogleService-Info file’s CLIENT_ID value
    gamepot_google_url_schemes GoogleService-Info file’s REVERSED_CLIENT_ID value
    gamepot_naver_clientid NAVER client ID
    gamepot_naver_secretid NAVER secret ID
    gamepot_naver_urlscheme NAVER URL scheme
    gamepot_line_channelid LINE channel ID
    gamepot_line_url_schemes LINE URL scheme (line3rdp.{project bundle ID})
    gamepot_twitter_consumerkey Twitter consumer key
    gamepot_twitter_consumersecret Twitter consumer secret
    gamepot_elsa_projectid Project ID when using NAVER Cloud ELSA
    gamepot_region Type “sg” only when the GAMEPOT Dashboard creation Region is Singapore.
    gamepot_license_url Enter https://gamepot.apigw.ntruss.com/fw/jp-v1 only if the GAMEPOT dashboard creation Region is Japan.
  3. From the iOS > Extra Plist Data > Additional Plist Data menu of the project settings, add the following options to obtain user permissions.

    • Required permissions when using the GAMEPOT customer inquiry UI
    <key>NSCameraUsageDescription</key>
    <string>$(PRODUCT_NAME) camera use.</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>$(PRODUCT_NAME) photo library use.</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>$(PRODUCT_NAME) Microphone use.</string>        
    
    • When using the permission request pop-up for acquiring IDFA value from the user
    <key>NSUserTrackingUsageDescription</key>
    <string>$(PRODUCT_NAME) This identifier will collect IDFA for advertising purposes.</string>
    
  4. After compressing GamePotResources.embeddedframework to a .zip,
    add it to the path $S(PluginDir)/ThirdParty/iOS/GamePotResources.embeddedframework.zip and proceed with the build.

Reset

To perform an initialization, add the following code to the object used in the first scene loaded when the game starts. The descriptions are based on each example file.

  • Reset example 1 - ASampleGameModeBase.h
    
    #include "GamePotSDKPluginModule.h"
    
    // Callback Event Listener declaration for the GAMEPOT API (used in the level)
    UCLASS()
    class GAMEPOTSDKSAMPLE_API ASampleGameModeBase : public AGameModeBase
    {
        ...   
       void OnLoginSuccess(FNUserInfo NUserInfo);
       void OnLoginCancel();
       void OnLoginFailure(FNError NError);
       void OnLoginMaintenance(FNAppStatus NAppStatus);
       void OnLoginNeedUpdate(FNAppStatus NAppStatus);
       void OnLoginExit();
       ...
    };
    


  • Reset example 2 - ASampleGameModeBase.cpp
    #include "ASampleGameModeBase.h"
    
    void ASampleGameModeBase::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
    {
        AGameModeBase::InitGame(MapName, Options, ErrorMessage);
    
         // Bind (the Event Listener declared in the header) to GamePotPluginModule's Callback Event Listener
         if (FGamePotSDKPluginModule::IsAvailable())
         {
             FGamePotSDKPluginModule::OnSdkLoginSuccess.AddUObject(this, &ASampleGameModeBase::OnLoginSuccess);
             FGamePotSDKPluginModule::OnSdkLoginCancel.AddUObject(this, &ASampleGameModeBase::OnLoginCancel);
             FGamePotSDKPluginModule::OnSdkLoginFailure.AddUObject(this, &ASampleGameModeBase::OnLoginFailure);
             FGamePotSDKPluginModule::OnSdkLoginMaintenance.AddUObject(this, &ASampleGameModeBase::OnLoginMaintenance);
             FGamePotSDKPluginModule::OnSdkLoginNeedUpdate.AddUObject(this, &ASampleGameModeBase::OnLoginNeedUpdate);
             FGamePotSDKPluginModule::OnSdkLoginExit.AddUObject(this, &ASampleGameModeBase::OnLoginExit);
    
             FGamePotSDKPluginModule::OnSdkLogoutSuccess.AddUObject(this, &ASampleGameModeBase::OnLogoutSuccess);
             FGamePotSDKPluginModule::OnSdkLogoutFailure.AddUObject(this, &ASampleGameModeBase::OnLogoutFailure);   
            ...
         }
    }
    
    void ASampleGameModeBase::OnLoginSuccess(FNUserInfo NUserInfo)
    {
        // Handling NUserInfo..
    }
    
    void ASampleGameModeBase::OnLoginCancel()
    {
    }
    
    void ASampleGameModeBase::OnLoginFailure(FNError NError)
    {
        // Handling NError Info..
    }
    


  • List of binding event listeners
      // Login succeeded
        FOnSdkLoginSuccess OnSdkLoginSuccess(FNUserInfo NUserInfo);     
        // Login canceled            
        FOnSdkLoginCancel OnSdkLoginCancel(); 
        // Login failed                                     
        FOnSdkLoginFailure OnSdkLoginFailure(FNError NError);   
        // Login (maintenance)                   
        FOnSdkLoginMaintenance OnSdkLoginMaintenance(FNAppStatus NAppStatus);
        // Login (update)      
        FOnSdkLoginNeedUpdate OnSdkLoginNeedUpdate(FNAppStatus NAppStatus);   
        // Login UI close (when using showLoginWithUI)     
        FOnSdkLoginExit OnSdkLoginExit();         
        // Close app (if during maintenance or update)                                      
        FOnSdkAppClose OnSdkAppClose();   
    
        // Logout success                                                                          
        FOnSdkLogoutSuccess OnSdkLogoutSuccess();   
        // Logout failed                               
        FOnSdkLogoutFailure OnSdkLogoutFailure(FNError NError);      
    
        // Close showWebview          
        FOnWebviewClose OnSdkWebviewClose(FString msg);
    
        // Purchase success
        FOnSdkPurchaseSuccess OnSdkPurchaseSuccess(FNPurchaseInfo NPurchaseInfo);
        // Purchase canceled
        FOnSdkPurchaseCancel OnSdkPurchaseCancel();
        // Purchase failed
        FOnSdkPurchaseFailure OnSdkPurchaseFailure(FNError NError);  
    
        // getPurchaseDetailListAsync succeeded
        FOnSdkPurchaseDetailListSuccess OnSdkPurchaseDetailListSuccess(TArray<FNPurchaseItem> Items);
        // getPurchaseDetailListAsync failed
        FOnSdkPurchaseDetailListFailure OnSdkPurchaseDetailListFailure(FNError NError);
    
        // createLinking succeeded
        FOnSdkCreateLinkingSuccess OnSdkCreateLinkingSuccess(FNUserInfo NUserInfo);
        // createLinking canceled
        FOnSdkCreateLinkingCancel OnSdkCreateLinkingCancel();
        // createLinking failed
        FOnSdkCreateLinkingFailure OnSdkCreateLinkingFailure(FNError NError);
    
        // deleteLinking succeeded
        FOnSdkDeleteLinkingSuccess OnSdkDeleteLinkingSuccess();
        // deleteLinking failed
        FOnSdkDeleteLinkingFailure OnSdkDeleteLinkingFailure(FNError NError);
    
        // Run scheme callback on notice image (showNotice, showEvent) click
        FOnSdkReceiveScheme OnSdkReceiveScheme(FString scheme);
    
        // deleteMember succeeded
        FOnSdkDeleteMemberSuccess OnSdkDeleteMemberSuccess();
        // deleteMember failed
        FOnSdkDeleteMemberFailure OnSdkDeleteMemberFailure(FNError NError);
    
        // Coupon (use) succeeded
        FOnSdkCouponSuccess OnSdkCouponSuccess(FString msg);
        // Coupon (use) failed
        FOnSdkCouponFailure OnSdkCouponFailure(FNError NError);
    
        // showAgreeDialog (Terms and Conditions agreement status) renewal succeeded
        FOnAgreeDialogSuccess OnSdkAgreeDialogSuccess(FNAgreeResultInfo NAgreeResultInfo);
        // showAgreeDialog (Terms and Conditions agreement status) renewal failed
        FOnAgreeDialogFailure OnSdkAgreeDialogFailure(FNError NError);
    
        // setPush succeeded
        FOnPushSuccess OnSdkPushSuccess();
        // setPushAdStatus succeeded
        FOnPushAdSuccess OnSdkPushAdSuccess();
        // setPushNightStatus succeeded
        FOnPushNightSuccess OnSdkPushNightSuccess();
        // setPushStatus succeeded
        FOnPushStatusSuccess OnSdkPushStatusSuccess();
    
        // setPush failed
        FOnPushFailure OnSdkPushFailure(FNError NError);
        // setPushAdStatus failed
        FOnPushAdFailure OnSdkPushAdFailure(FNError NError);
        // setPushNightStatus failed
        FOnPushNightFailure OnSdkPushNightFailure(FNError NError);
        // setPushStatus failed
        FOnPushStatusFailure OnSdkPushStatusFailure(FNError NError);
    

Set error codes

Use the following code to set up error codes.

USTRUCT()
struct FNError
{
    //Detail Error code
    static const int CODE_UNKNOWN_ERROR = 0;                    // Unknown error
    static const int CODE_NOT_INITALIZE = 1;                    // Reset failed
    static const int CODE_INVAILD_PARAM = 2;                    // Incorrect parameters
    static const int CODE_MEMBERID_IS_EMPTY = 3;                    // No member ID data
    static const int CODE_NOT_SIGNIN = 4;                    // Not logged in
    static const int CODE_NETWORK_MODULE_NOT_INIT = 3000;                 // If the network module is not reset
    static const int CODE_NETWORK_ERROR = 3001;                 // Network connectivity errors and timeouts
    static const int CODE_SERVER_ERROR = 4000;                 // Server-side error
    static const int CODE_SERVER_HTTP_ERROR = 4001;                 // If the HTTP response code is not successful
    static const int CODE_SERVER_NETWORK_ERROR = 4002;                 // When network connection errors and timeouts occur
    static const int CODE_SERVER_PARSING_ERROR = 4003;                 // Errors parsing data received from the server
    static const int CODE_CHARGE_UNKNOWN_ERROR = 5000;                 // If the payment encounters an unknown error and the store passes an error
    static const int CODE_CHARGE_PRODUCTID_EMPTY = 5001;                 // If a product ID is not entered
    static const int CODE_CHARGE_PRODUCTID_WRONG = 5002;                 // If an incorrect product ID is entered
    static const int CODE_CHARGE_CONSUME_ERROR = 5003;                 // Errors on consume

    UPROPERTY()
    int code;               // error Code

    UPROPERTY()
    FString message;        // error Message
}

Login-related features

You can integrate various login SDK features such as Google, Facebook, and NAVER, and use them in GAMEPOT Unreal SDK.

Settings before use

To use the login-related SDK features, you need to declare login-related code after completing necessary console settings.

Set up Google login environment

The following describes how to set up Google Firebase console to use the login feature.

  1. Copy the google-service.json file for Android you obtained from the Google Firebase console and paste it in the $S(PluginDir)/ThirdParty/Android/ path.
  2. Add the SHA-1 value of the keystore file used when configuring the APK to the Firebase console.
  • When attempting Google login, if it fails with the onCancel response, you can resolve it by taking the following steps.
    • Check if the google-service.json was correctly applied.
    • Check if the keystore used when configuring the APK and the keystore that the SHA-1 value was extracted from for registration to the Firebase console are identical
    • Verify that the build was made with the package name registered in the Firebase console.
  1. Add Google-specific CFBundleURLSchemes values within AdditionalPlistData
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>REVERSED_CLIENT_ID value in the GoogleService-Info.plist file e.g., com.googleusercontent.apps.XXXXXXXXX</string>
</array>
...
</dict>

Set up Facebook login environment

The following describes how to set up Facebook console to use the login feature.

  1. From the Facebook for Developers console, select the app type as None, Consumer, or Gaming, and create the app.

  2. Add the key hash value of the keystore file used when configuring the APK to the Facebook for Developers console.

  3. Enter the app ID acquired from the Facebook for Developers console to the following code, and add it to the GamePot_Android_UPL.xml file for Android.

    ...
    <resourceCopies>
            <copyFile src="$S(PluginDir)/ThirdParty/Android/libs/gamepot-channel-facebook.aar" dst="$S(BuildDir)/libs/gamepot-channel-facebook.aar" />
    </resourceCopies>
    ...
    
    ...
    <buildGradleAdditions>
        <insert>
    
            ...
            dependencies {
                ...
                implementation(name: 'gamepot-channel-facebook', ext: 'aar')
                ...
            }
    
            ...
    
            defaultConfig {
                resValue "string", "facebook_app_id", "1234567890"
                resValue "string", "fb_login_protocol_scheme", "fb1234567890"
            }
            ...
    
        </insert>
    </buildGradleAdditions>
    
    ...
    
    <gameActivityImportAdditions>
      <insert>
        import io.gamepot.channel.facebook.GamePotFacebook;
      </insert>
    </gameActivityImportAdditions>
    
    
  4. Add the following code to project's GamepotConfig-info.plist file.

    gamepot_facebook_app_id // App ID acquired from the Facebook developer console
    

    Add the following when checking with SourceCode.

    ...
     <key>gamepot_facebook_app_id</key>
     <string>xxxxxx</string>
     ...
    
  5. Add CFBundleURLSchemes and LSApplicationQueriesSchemes values related to Facebook in AdditionalPlistData

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb[Facebook app ID] e.g., fb100001</string>
</array>
...
</dict>
…..
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
……
</array>

Set up Apple login environment

To set up an Apple login environment dedicated to iOS, in the/Script/IOSRuntimeSettings.IOSRuntimeSettings item in the DefaultEngine.ini file in the Config path, add the bEnableSignInWithAppleSupport=True flag value.

Login feature

Use the following code to use the SDK login feature that functions when clicking the login button according to the login UI implemented by the developer. A MemberId is generated to verify the user information, and the generated information is stored in FNUserInfo and returned.


if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
FGamePotSDKPluginModule::GetSharedGamePotSdk()->Login(ENLoginType::Type loginType);

void ASampleGameModeBase::OnLoginSuccess(FNUserInfo NUserInfo)
{
    // Login success
}

void ASampleGameModeBase::OnLoginCancel()
{
    // Login canceled
}

void ASampleGameModeBase::OnLoginFailure(FNError NError)
{
   // Login failed
    // Display the message using NError.message.
}

// Maintenance (calls when the maintenance feature is enabled in the dashboard)
void ASampleGameModeBase::OnLoginMaintenance(FNAppStatus NAppStatus)
{
   // You need to create and display a pop-up window based on the status information passed in a parameter. Choose between the following two methods to configure the pop-up window:
    // Case 1: Use an in-game pop-up window with its UI implemented directly by the developer.
    // Case 2: Call the following code and use the SDK's own pop-up window.
    IGamePotSdk* ptr = FGamePotSDKPluginModule::GetSharedGamePotSdk();
    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        ptr->showAppStatusPopup(NAppStatus.ToJsonString());
}

// Force update (calls when the store version does not match the client version)
void ASampleGameModeBase::OnLoginNeedUpdate(FNAppStatus NAppStatus)
{
     // You need to create and display a pop-up window based on the status information passed in a parameter. Choose between the following two methods to configure the pop-up window:
    // Case 1: Use an in-game pop-up window with its UI implemented directly by the developer.
    // Case 2: Call the following code and use the SDK's own pop-up window.
    IGamePotSdk* ptr = FGamePotSDKPluginModule::GetSharedGamePotSdk();
    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        ptr->showAppStatusPopup(NAppStatus.ToJsonString());
}

void ASampleGameModeBase::OnLoginExit()
{
   // When implementing the force update or maintenance feature with the Case 2 method, it may force end the app. Implement it here to enable ending the app.
}

void ASampleGameModeBase::OnAppClose()
{
    // End the app
    // When implementing the force update or maintenance feature with the Case 2 method, it may force end the app. Implement it here to enable ending the app.
}

Define Log-inType, NUserInfo, and NAppStatus

Use the following code to set up various parameters for the login feature.

  • LoginType
    UENUM()
    namespace ENLoginType
    {
        enum Type
        {
            NONE,
            GOOGLE,
            GOOGLEPLAY,
            FACEBOOK,
            NAVER,
            GAMECENTER,
            TWITTER,
            LINE,
            APPLE,
            GUEST,
            THIRDPARTYSDK,
            STANDALONE
        };
    }
    
  • NUserInfo
    USTRUCT()
    struct FNUserInfo
    {
        UPROPERTY()
        FString memberid;           // Memebr ID (unique user ID)                   
        UPROPERTY()
        FString name;               // Name
        UPROPERTY()
        FString profileUrl;         // Profile URL (if present)                     
        UPROPERTY()
        FString email;              // Email (if present)
        UPROPERTY()
        FString token;              // Token for checking user validity (used in Token Authentication API)
        UPROPERTY()
        FString userid;             // Social media ID
    }
    
  • NAppStatus
    USTRUCT()
    struct FNAppStatus
    {
        UPROPERTY()
        FString type;       // AppStatus type, represents maintenance when "maintenance," and update when "needupdate"
    
        UPROPERTY()
        FString message;    // Maintenance settings: message entered in dashboard
    
        UPROPERTY()
        FString url;        // Maintenance settings: URL entered in dashboard
    
        UPROPERTY()
        FString currentAppVersion;  // Update: current app version
    
        UPROPERTY()
        FString updateAppVersion;   // Update : app version entered in dashboard
    
        UPROPERTY()
        int currentAppVersionCode;  // Update: current app code
    
        UPROPERTY()
        FString updateAppVersionCode;   // Update : app version code entered in dashboard
    
        UPROPERTY()
        bool isForce;       // Update: true if force update is enabled in dashboard
    
        UPROPERTY()
        FString resultPayload;  // This is a JSON value passed from the client SDK; you can ignore it.
    
        UPROPERTY()
        double startedAt;    // Maintenance: start time (timestamp)
    
        UPROPERTY()
        double endedAt;     // Maintenance: end time (timestamp)
    }
    

Set the permission request pop-up to acquire IDFA value

Use the following code to use the permission request pop-up window to acquire the user IDFA value in the iOS platform.

   if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->requestTrackingAuthorization();

    void ASampleGameModeBase::OnSdkResultTrackingAuthorization(FNResultTrackingAuthorization info) {
        // info.authorization (FString)
        //        ATTrackingManagerAuthorizationStatusNotDetermined,
        //        ATTrackingManagerAuthorizationStatusRestricted,
        //        ATTrackingManagerAuthorizationStatusDenied,
        //        ATTrackingManagerAuthorizationStatusAuthorized,
        //        ATTrackingManagerAuthorizationStatusUnknown
    }
    
    // The pop-up window requesting permissions for the IDFA value acquisition can be displayed arbitrarily. After permissions are acquired, the pop-up window does not appear, even when the method is called.


  • Change pop-up window request point

The permission request pop-up window for acquiring IDFA values on the iOS platform is requested at the time of the login API call. If you don't want this pop-up request to be called at the time of login, edit the method in the $S(PluginDir)/Private/iOS/IOSGamePotSdk.cpp file as follows:

void FIOSGamePotSdk::Login(ENLoginType::Type _loginType)
{
    // Explicitly display the IDFA pop-up before login <-- annotate when necessary
    FIOSGamePotSdk::requestTrackingAuthorization();
    ...

Use login feature by account

Use the following code to apply settings to use the login feature by account.

NAVER login

To use the NAVER login feature, select Login with NAVER IDas the API to use in the NAVER Developers console, register the app, and then use the following code.

  • Android

    • Edit GamePot_Android_UPL.xml
    ...
    <resourceCopies>
            <copyFile src="$S(PluginDir)/ThirdParty/Android/libs/gamepot-channel-naver.aar" dst="$S(BuildDir)/libs/gamepot-channel-naver.aar" />
    </resourceCopies>
    
    ...
    
    <buildGradleAdditions>
        <insert>
    
            ...
            dependencies {
                ...
                implementation(name: 'gamepot-channel-naver', ext: 'aar')
                ...
            }
    
            ...
    
            defaultConfig {
                resValue "string", "gamepot_naver_clientid", "abcdefg1234567890"
                resValue "string", "gamepot_naver_secretid", "hijklmn"
            }
            ...
    
        </insert>
    </buildGradleAdditions>
    
    ...
    
    <gameActivityImportAdditions>
      <insert>
        import io.gamepot.channel.naver.GamePotNaver;
      </insert>
    </gameActivityImportAdditions>
    
    ...
    
    • Enter the client ID acquired from the NAVER developer console in the gamepot_naver_clientid value and enter the client secret in the gamepot_naver_secretid value.
    • Add the gamepot-channel-naver.aar file to the project $S(PluginDir)ThirdParty/Android/libs path


  • iOS
    • Edit GamePotSDKPlugin.Build.cs file
    ...
    
    public GamePotSDKPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        ...
               else if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                    PublicAdditionalFrameworks.Add(
                    new Framework(
                        "GamePotNaver",
                        ModuleDirectory+"/ThirdParty/iOS/GamePotNaver.framework"
                    )
                );
    
                    PublicAdditionalFrameworks.Add(
                    new Framework(
                        "NaverThirdPartyLogin",
                        ModuleDirectory+"/ThirdParty/iOS/NaverThirdPartyLogin.framework"
                    )
            }
        ...
    }
    ...
    
    • Edit GamePotConfig-info.plist file
     gamepot_naver_clientid // Client ID to be used in NAVER
     gamepot_naver_secretid // Secret ID to be used in NAVER
     gamepot_naver_urlscheme // URL scheme to be used in NAVER
    
    Add the following when checking with SourceCode.
    ...
    <key>gamepot_naver_clientid</key>
    <string>xxxxxx</string>
    <key>gamepot_naver_secretid</key>
    <string>xxxxxx</string>
    <key>gamepot_naver_urlscheme</key>
    <string>xxxxxx</string>
    ...
    

Add CFBundleURLSchemes and LSApplicationQueriesSchemes values related to NAVER in AdditionalPlistData

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>IOS schemes value set in the NAVER console</string>
</array>
...
</dict>
…..
<key>LSApplicationQueriesSchemes</key>
<array>
<string>naversearchapp</string>
<string>naversearchthirdlogin</string>
<string>navercafe</string>
……
</array>

LINE login

To use the LINE login feature, add the package name used when configuring the APK, SHA-1 value of the keystore, and URL scheme value to the LINE Developers console, and then use the following code.

  • Android

    • Edit GamePot_Android_UPL.xml
    ...
    <resourceCopies>
        <copyFile src="$S(PluginDir)/ThirdParty/Android/libs/gamepot-channel-line.aar" dst="$S(BuildDir)/libs/gamepot-channel-line.aar" />
        <copyFile src="$S(PluginDir)/ThirdParty/Android/libs/line-sdk-4.0.10.aar" dst="$S(BuildDir)/libs/line-sdk-4.0.10.aar" />
    </resourceCopies>
    
    ...
    
    <buildGradleAdditions>
        <insert>
    
            ...
            dependencies {
                ...
                implementation(name: 'gamepot-channel-line', ext: 'aar')
                implementation(name: 'line-sdk-4.0.10', ext: 'aar')
                ...
            }
    
            ...
    
            defaultConfig {
                resValue "string", "gamepot_line_channelid","xxxxxxx"
            }
            ...
    
        </insert>
    </buildGradleAdditions>
    
    ...
    
    <gameActivityImportAdditions>
      <insert>
        import io.gamepot.channel.line.GamePotLine;
      </insert>
    </gameActivityImportAdditions>
    
    ...
    
    • Add the gamepot-channel-line.aar file and line-sdk-4.0.10.aar file to the project $S(PluginDir)ThirdParty/Android/libs path

  • iOS

    • Edit GamePotSDKPlugin.Build.cs file
    ...
    
    public GamePotSDKPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        ...
               else if (Target.Platform == UnrealTargetPlatform.IOS)
            {
                    PublicAdditionalFrameworks.Add(
                    new Framework(
                        "GamePotLine",
                        ModuleDirectory+"/ThirdParty/iOS/GamePotLine.framework"
                    )
                );
    
                PublicAdditionalFrameworks.Add(
                    new Framework(
                        "LineSDK",
                        ModuleDirectory+"/ThirdParty/iOS/LineSDK.framework"
                    )
                );
    
                PublicAdditionalFrameworks.Add(
                    new Framework(
                        "LineSDKObjC",
                        ModuleDirectory+"/ThirdParty/iOS/LineSDKObjC.framework"
                    )
                );
            }
        ...
    }
    ...
    
    • Edit GamePotConfig-info.plist file
     gamepot_line_channelid // Client ID to be used in NAVER
     gamepot_line_url_schemes // LINE URL scheme (line3rdp.{Project bundle identifier})
    

    Add the following when checking with SourceCode.

    ...
    <key>gamepot_line_channelid</key>
    <string>xxxxxx</string>
    <key>gamepot_line_url_schemes</key>
    <string>xxxxxx</string>
    ...
    

    Add CFBundleURLSchemes and LSApplicationQueriesSchemes values related to LINE in AdditionalPlistData

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>line3rdp.{project bundle identifier}<</string>
</array>
...
</dict>
…..
<key>LSApplicationQueriesSchemes</key>
<array>
<string>lineauth2</string>
……
</array>

Apple web login

To use the Apple web login feature, set up Apple ID login from the Project settings > General menu of the dashboard, and then use the following code.

  • Edit GamePot_Android_UPL.xml
...
<resourceCopies>
        <copyFile src="$S(PluginDir)/ThirdParty/Android/libs/gamepot-channel-apple-signin.aar" dst="$S(BuildDir)/libs/gamepot-channel-apple-signin.aar" />
</resourceCopies>

...

<buildGradleAdditions>
    <insert>

        ...
        dependencies {
            ...
            implementation(name: 'gamepot-channel-apple-signin', ext: 'aar')
            ...
        }

        ...

    </insert>
</buildGradleAdditions>

...

<gameActivityImportAdditions>
  <insert>
    import io.gamepot.channel.naver.GamePotAppleSignin;
  </insert>
</gameActivityImportAdditions>

...
  • Add the gamepot-channel-apple-signin.aar file to the project $S(PluginDir)/ThirdParty/Android/libs path

Auto login feature

To use the auto login feature through the API that delivers the last login information of the member, use the following code.

ENLoginType::Type loginType =  FGamePotSDKPluginModule::GetSharedGamePotSdk()->getLastLoginType();

if(loginType != ENLoginType::NONE) {
{
    // Log in with the user's last login type.
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->Login(loginType);
}
else
{
    // The user logs in the game for the first time, or is currently logged out. Move to the login page where the user can log in.
}

Logout feature

Use the following code to use the logout feature.

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->Logout();
    
void ASampleGameModeBase::OnLogoutSuccess()
{
}

void ASampleGameModeBase::OnLogoutFailure(FNError NError)
{
    // Logout failed. Display the message using NError.message.
}

Membership withdrawal feature

Use the following code to use the membership withdrawal feature.


if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->deleteMember();
    
/// Membership withdrawal succeeded
void ASampleGameModeBase::OnDeleteMemberSuccess()
{

}

void ASampleGameModeBase::OnDeleteMemberFailure(FNError NError)
{
   // Membership withdrawal failed. Display the message using NError.message.
}

Login validation feature

After the login is complete, the login information can be passed from the developer server to the GAMEPOT server to perform login validation.

For more information, see Request login validation.

Integrate external account

You can connect or disconnect multiple external accounts to a game account.

Account link feature

Use the following code to use the integration feature to various external accounts including Google, Facebook, and NAVER.

UENUM()
namespace ENLinkingType
{
    enum Type
    {
        NONE,
        GOOGLEPLAY,
        GAMECENTER,
        GOOGLE,
        FACEBOOK,
        NAVER,
        TWITTER,
        LINE,
        APPLE,
        THIRDPARTYSDK
    };
}

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->createLinking(ENLinkingType::Type linkingType);
    
void ASampleGameModeBase::OnCreateLinkingSuccess(FNUserInfo NUserInfo) {
        // Account connection succeeded.
}

void ASampleGameModeBase::OnCreateLinkingCancel() {
        // When the user cancels account linkage

}
void ASampleGameModeBase::OnCreateLinkingFailure(FNError NError) {
        // Account linkage failed. Display the message using NError.message.
}

Linkage list check feature

Use the following code to check the list of external accounts connected to the account.

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
     TArray<FNLinkingInfo> linkedList = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getLinkedList();


//Define link information
USTRUCT()
struct FNLinkingInfo
{
    UPROPERTY()
    ENLinkingType::Type provider;      // Account integration information (Google, Facebook, NAVER, Apple..)
}
}

Linkage removal feature

Use the following code to use the integration removal feature from external accounts.


if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->deleteLinking(ENLinkingType::Type linkType);
    
void ASampleGameModeBase::OnDeleteLinkingSuccess() {
/// Account linkage removal succeeded
}

void ASampleGameModeBase::OnDeleteLinkingFailure(FNError NError) {
    /// Account linkage removal failed. Display the message using NError.message.
}

Payment feature

You can use the payment feature for in-app purchases.

View in-app products feature

Use the following code to use the feature to view information of products registered in the store.

[Case1]

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    TArray<FNPurchaseItem> itemList = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getPurchaseItems();


[Case2]

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->getPurchaseDetailListAsync();
    
// getPurchaseDetailListAsync succeeded
void ASampleGameModeBase::OnSdkPurchaseDetailListSuccess(TArray<FNPurchaseItem> Items)
{
}

// getPurchaseDetailListAsync failed
void ASampleGameModeBase::OnSdkPurchaseDetailListFailure(FNError NError)
{
    
}



USTRUCT()
struct FNPurchaseItem
{
    UPROPERTY()
    FString productId;              // Product ID    

    UPROPERTY()
    FString type;                   // Product type. Fix as "inapp"

    UPROPERTY()
    FString price;                  // Price; Google Store: 0.99 USD, other stores: 0.99   

    UPROPERTY()
    FString price_amount;           

    UPROPERTY()
    FString price_amount_micros;    // (Recommended for UI display) The combined value of the currency and price.  The currency unit will not be sent for ONE Store. E.g., $0.99

    UPROPERTY()
    FString price_currency_code; // Currency code; e.g., KRW, USD

    UPROPERTY()
    FString price_with_currency;

    UPROPERTY()
    FString title;                   // Product name       

    UPROPERTY()
    FString description;            // Product description
}

Payment attempt feature

You can use the payment attempt feature in both Google Play Store and Apple App Store with a single payment API.

Use the following code to use the payment attempt feature.

// productId: product ID registered in the store
// uniqueId: receipt ID that is separately managed
// serverId: server ID of the character for whom the payment was made
// playerId: character ID of the character for whom the payment was made
//  etc       : other information of the character that made the purchase

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->purchase(FString productId, FString uniqueId, FString serverId, FString playerId, FString etc);
    
    /// In-app payment succeeded
 void ASampleGameModeBase::OnPurchaseSuccess(FNPurchaseInfo NPurchaseInfo)
 {
 }

/// In-app payment canceled
 void ASampleGameModeBase::OnPurchaseCancel()
 {
 }

/// In-app payment failed
 void ASampleGameModeBase::OnPurchaseFailure(FNError NError)
 {
       // Display the message using NError.message.
 }

Acquire payment item information feature

Use the following code to use the feature to acquire in-app payment item information delivered from the store.


USTRUCT()
struct FNPurchaseInfo
{
    UPROPERTY()
    FString price;                         // Price of the purchased item    
    UPROPERTY()
    FString productId;                  // Purchsed item ID   
    UPROPERTY()
    FString currency;                    // Purchase price currency (KRW/USD) 
    UPROPERTY()
    FString orderId;                      // Store order ID    
    UPROPERTY()
    FString productName;            // Purchsed item name 
    UPROPERTY()
    FString gamepotOrderId;         // Order ID created in GAMEPOT    
    UPROPERTY()
    FString uniqueId;                    // Receipt ID separately managed by the developer  
    UPROPERTY()
    FString serverId;                    // Server ID of the character that made the purchase   
    UPROPERTY()
    FString playerId;                    // Character ID of the character that made the purchase
    UPROPERTY()
    FString etc;                         // Other information of the character that made the purchase  
    UPROPERTY()
    FString signature;                  // Store signature     
    UPROPERTY()
    FString originalJSONData;   // Receipt data
}

Provide purchased item feature

You can set it so that the payment request is sent to the developer server only upon the completion of validation, which compares it to the receipt history of the purchased store.

For more information, see Request item provision.

My Card payment

Check the FacServiceID/KEY values to integrate with My Card from My Card, and set them on the dashboard.

  1. In Dashboard > Payment > IAP, enter Store type: Google item > Add price > Enter currency (e.g., TWD) and price information, and then save.

  2. Add My Card to the Dashboard > Project settings > External payment item, and check if the FacService ID/Sign key have been entered correctly.

  3. The payment will call the SDK's following code.

// productId: Enter the product ID registered in the store.
// uniqueId: Enter the receipt number managed separately.
// serverId: Enter the server ID of the character for whom the payment is made.
// playerId: Enter the character ID for whom the payment is made.
// etc       : Enter the other information from the character who made the payment.

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->purchase(FString productId, FString uniqueId, FString serverId, FString playerId, FString etc);

  • Use the following API for the form of payment item calling while using My Card.
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
 TArray<FNPurchaseItem> itemList = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getPurchaseThirdPaymentsItems();
  1. Open the $S(PluginDir)/GamePot_Android_UPL.xml file with an editor.

...
    <resourceCopies>
    ...
    <copyFile src="$S(PluginDir)/ThirdParty/Android/libs/gamepot-billing-mycard.aar" dst="$S(BuildDir)/libs/gamepot-billing-mycard.aar" />
    ....
    
  <buildGradleAdditions>
  ...
       dependencies {
      ...
      implementation(name: 'gamepot-billing-mycard', ext: 'aar')
      ...
      
      defaultConfig {
      ...
      resValue "string", "gamepot_store", "google"
      resValue "string", "gamepot_payment", "mycard" // This only works if the store is Google.
  1. Check if the ../ThirdParty/Android/libs/gamepot-billing-mycard.aar folder contains gamepot-billing-mycard.aar.

External payment

To integrate with an external payment module, first complete setting it up by referring to Integrate external payment service, and then use the following code.

// productId: product ID registered in the store
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->purchaseThirdPayments(FString productId);


// API to call the product information list
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    TArray<FNPurchaseItem> itemList = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getPurchaseThirdPaymentsItems();

Login UI provided by SDK

You can use the login UI provided by GAMEPOT Unreal SDK in a completed form.

Call login UI provided by SDK

Use the following code to call login UI provided by GAMEPOT Unreal SDK.

USTRUCT()
struct FNLoginUIInfo
{
    //Whether to show the image logo
    UPROPERTY()
    bool showLogo;

    //Login type to show as UI
    UPROPERTY()
    TArray<ENLoginType::Type> loginTypes;  //google, facebook...
}

//Type of login UI to call
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showLoginWithUI(FNLoginUIInfo NLoginUIInfo);
    
void ASampleGameModeBase::OnLoginSuccess(FNUserInfo NUserInfo)
{
    // Login succeeded
}

void ASampleGameModeBase::OnLoginCancel()
{
    // Login canceled
}

void ASampleGameModeBase::OnLoginFailure(FNError NError)
{
   // Login failed. Display the message using error.message.
}

// Check (call this when Check is enabled in the dashboard.)
void ASampleGameModeBase::OnLoginMaintenance(FNAppStatus NAppStatus)
{
   // You need to create and display a pop-up window based on the status information passed in a parameter. Choose between the following two methods to configure the pop-up window:
    // Case 1: Use an in-game pop-up window with its UI implemented directly by the developer.
    // Case 2: Call the following code and use the SDK's own pop-up window.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->showAppStatusPopup(NAppStatus.ToJsonString());
}

// Force update (calls when the store version does not match the client version)
void ASampleGameModeBase::OnLoginNeedUpdate(FNAppStatus NAppStatus)
{
     // You need to create and display a pop-up window based on the status information passed in a parameter. Choose between the following two methods to configure the pop-up window:
    // Case 1: Use an in-game pop-up window with its UI implemented directly by the developer.
    // Case 2: Call the following code and use the SDK's own pop-up window.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->showAppStatusPopup(NAppStatus.ToJsonString());
}

void ASampleGameModeBase::OnLoginExit()
{
    // TODO: When ending the login UI,
}

void ASampleGameModeBase::OnAppClose()
{
    // End the app
    // When implementing the force update or maintenance feature with the Case 2 method, it may force end the app. Implement it here to enable ending the app.

}

Set logo image for the provided login UI (Android)

You can set the image displayed at the top of the provided login UI for Android. If you don't set it up separately, then the default image included in the SDK is used. You can set up images that suits the game.

The following describes how you can set the image for the provided login UI for Android.

  1. As shown below, create REW/drawable folders each and add image files for each size.
    Folder name Capacity
    $S(PluginDir)/ThirdParty/GamePotResources/res/drawable-mdpi// 24x24
    $S(PluginDir)/ThirdParty/GamePotResources/res/drawable-hdpi/ 36x36
    $S(PluginDir)/ThirdParty/GamePotResources/res/drawable-xhdpi/ 48x48
    $S(PluginDir)/ThirdParty/GamePotResources/res/drawable-xxhdpi/ 72x72
    $S(PluginDir)/ThirdParty/GamePotResources/res/drawable-xxxhdpi/ 96x96
  2. Change the name of the image files to ic_stat_gamepot_login_logo.png.

Coupon feature

Use the following code to use the feature that processes the coupon entered by the user as used.

   if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    {
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->coupon(FString couponNumber); // Coupon code

        FGamePotSDKPluginModule::GetSharedGamePotSdk()->coupon(FString couponNumber, FString userData); // Coupon code, user information
    }
    
void ASampleGameModeBase::OnCouponSuccess(FString msg)
{
    /// Succeeded in using coupon
}

void ASampleGameModeBase::OnCouponFailure(FNError NError)
{
      // Failed to use coupon. Display the message using error.message.
}

Provide items

When a coupon is used successfully, it requests the provision of items to the developer server.

For more information, see Request item provision.

Push feature

You can enable or disable general push, night push, and ad push features.
Set the ad push setting to true if you are using the push feature. (If the ad push value is false, push messages don't come through, regardless of the general/night push settings.)

Set general push

Use the following code to set up general push.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->setPushStatus(bool pushEnable); 
        
void ASampleGameModeBase::OnPushSuccess()
{
    /// Push status change succeeded
}

void ASampleGameModeBase::OnPushFailure(FNError NError)
{
        // Push status change failed. Display the message using error.message.
}

Set night push

Use the following code to set up night push.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->setPushNightStatus(bool nightPushEnable); 

void ASampleGameModeBase::OnPushNightSuccess()
{
    /// Push status change succeeded
}

void ASampleGameModeBase::OnPushNightFailure(FNError NError)
{
        // Night push status change failed. Display the message using error.message.
}

Set ad push

Use the following code to set up ad push.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->setPushADStatus(bool adPushEnable); 

void ASampleGameModeBase::OnPushAdSuccess()
{
    /// Ad push status change succeeded
}

void ASampleGameModeBase::OnPushFailure(FNError NError)
{
        // Ad push status change failed. Display the message using error.message.
}

Set general push, night push, and ad push at once

For games that check whether users will allow push before login, make sure to call the following code after login.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->setPushStatus(bool pushEnable, bool nightPushEnable, bool adPushEnable); 
 
void ASampleGameModeBase::OnPushStatusSuccess()
{
    /// Push status change succeeded
}

void ASampleGameModeBase::OnPushStatusFailure(FNError NError)
{
        // Push status change failed. Display the message using error.message.
}

Check push status

Use the following code to check the current push status.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FNPushInfo NPushInfo = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getPushStatus(); 
        
USTRUCT()
struct FNPushInfo
{
    UPROPERTY()
    bool enable;       // Whether to allow general push               

    UPROPERTY()
    bool night;         // Whether to allow night push

    UPROPERTY()
    bool ad;            // Whether to allow ad push
}

Display notice image feature

You can set to display the image uploaded to the Notice menu in the dashboard. Recommended sizes for images are shown below.

  • Size: 720 x 1200 (portrait), 1280 x 640 (landscape)
  • File size: 250 KB or smaller

Use the following code to display the image uploaded to the Notice menu in the dashboard.


if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showNotice(bool showToday = true); 

// true: apply Do not show for 24 hours
// false: force exposure regardless of Do not show for 24 hours

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showEvent(FString Type); 

// Type: only show the images that fall under the classification name set in the Notice > Classification menu in the dashboard

 void ASampleGameModeBase::OnReceiveScheme(FString scheme)
 {
      // Send the scheme value set in the GAMEPOT dashboard
 }

Support feature

By integrating the dashboard, you can use features such as customer inquiry, call policies and terms UI, and consent collection.

Customer inquiry feature

You can use the customer inquiry feature where members can send in inquiries and managers can answer them. It is integrated with the Support > Customer inquiry menu in the dashboard.

The customer inquiry UI is changed to a language among Korean, English, Japanese, Simplified Chinese, and Traditional Chinese according to the device language. If the device language is in another language, then it is changed to English.

Use the following code to use the customer inquiry feature by integrating the dashboard.

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showCSWebView(); 

Customer inquiry through external link

Use the following code to allow inquiry registration by customers who are not logged in, through an external link.

// url: External customer support URL issued by GAMEPOT
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showWebView(FString url); 

Call terms and policies UI feature

You can call various terms and policies created in the Support menu in the dashboard.

Use the following code to call terms and policies UI.

  • Terms and Conditions

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->showTerms(); 
    
  • Privacy Policy

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->showPrivacy(); 
    
  • Refund policy

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->showRefund(); 
    

Agree to Terms and Conditions feature (including GDPR)

By using the provided pop-up UI feature, you can collect consent for various policies and terms created in the dashboard. You can also collect consent for the GDPR policy.

Call Agree to Terms and Conditions UI

Use the following code to change the theme of the provided Agree to Terms and Conditions UI and call it.

// Case 1) Basic call (with BLUE theme)
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showAgreeDialog(); 

// Case 2) When applying other themes
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
{
    // - Basic theme
    // BLUE
    // GREEN
    
    //  - Improved theme
    // MATERIAL_RED,
    // MATERIAL_BLUE,
    // MATERIAL_CYAN,
    // MATERIAL_ORANGE,
    // MATERIAL_PURPLE,
    // MATERIAL_DARKBLUE,
    // MATERIAL_YELLOW,
    // MATERIAL_GRAPE,
    // MATERIAL_GRAY,
    // MATERIAL_GREEN,
    // MATERIAL_PEACH,

    FNAgreeInfo info;
    info.theme = "MATERIAL_RED";
    info.headerTitle = TEXT("title");
    info.headerBackGradient = "{ 0xFF00050B, 0xFF0F1B21 }";
    info.headerBottomColor = "0xFFFF0000";
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->showAgreeDialog(info.ToJsonString()); 
}

// If agreed to Terms and Conditions
void ASampleGameModeBase::OnAgreeDialogSuccess(FNAgreeResultInfo NAgreeResultInfo)
{
       // NAgreeResultInfo.agree: true if all required terms and conditions have been agreed to
        // NAgreeResultInfo.agreePush: (General) true if checked to agree to receive push, false if not
        // NAgreeResultInfo.agreeNight: true if checked to agree to receive night ad push, false if not
        // Set agreePush/agreeNight values at once through setPushStatus API after login is complete.
}

void ASampleGameModeBase::OnAgreeDialogFailure(FNError NError)
{
    // Error occurred
}
  • Define NAgreeInfo
    USTRUCT()
    struct FNAgreeInfo
    {    
        // Basic theme
        UPROPERTY()
        FString theme;
    
        // Title
        // Background color (gradient)
        UPROPERTY()
        TArray<FString> headerBackGradient;
    
        // Title area bottom line color
        UPROPERTY()
        FString headerBottomColor;
    
        // Icon image file name (aos - drawable / ios - bundle)
        UPROPERTY()
        FString headerIconDrawable;
    
        // Subject
        UPROPERTY()
        FString headerTitle;
    
        // Subject color
        UPROPERTY()
        FString headerTitleColor;
    
        // Content
        // Background color (gradient)
        UPROPERTY()
        TArray<FString> contentBackGradient;
    
        // Icon image file name (aos - drawable / ios - bundle)
        UPROPERTY()
        FString contentIconDrawable;
    
        // Icon color
        UPROPERTY()
        FString contentIconColor;
    
        // Check button color
        UPROPERTY()
        FString contentCheckColor;
    
        // Check content color
        UPROPERTY()
        FString contentTitleColor;
    
        // Instruction text color to show all
        UPROPERTY()
        FString contentShowColor;
    
        // Bottom (Game start)
        // Background color (gradient)
        UPROPERTY()
        TArray<FString> footerBackGradient;
    
        // Game start button background color (gradient)
        UPROPERTY()
        TArray<FString> footerButtonGradient;
    
        // Game start button outline color
        UPROPERTY()
        TArray<FString> footerButtonOutlineColor;
    
        // Game start text
        UPROPERTY()
        TArray<FString> footerTitle;
    
        // Game start text color
        UPROPERTY()
        TArray<FString> footerTitleColor;
    
        //Whether to show general push notification
        UPROPERTY()
        bool showPush;
    
        // Whether to show night push notification
        UPROPERTY()
        bool showNightPush;
    
        // When "Agree to all" text changes
        UPROPERTY()
        FString allMessage;
    
        // When "Terms and Conditions" text changes
        UPROPERTY()
        FString termMessage;
    
        // When "Privacy Policy" text changes
        UPROPERTY()
        FString privacyMessage;
    
        // When general push text changes
        UPROPERTY()
        FString pushMessage;
    
        // When night push text changes
        UPROPERTY()
        FString nightPushMessage;
    
        UPROPERTY()
        FString pushDetailURL;
    
        UPROPERTY()
        FString nightPushDetailURL;
    }
    


  • Each variable applies to the area displayed in the following image.
    gamepot_unreal_002_ko

GDPR Terms and Conditions checklist feature

Use the following code to import the GDPR Terms and Conditions items activated from the dashboard in the form of a list.

// The returned data format is FString type, and in the form of string[]. e.g., "[ gdpr_privacy, gdpr_term ]"
if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FString gdpr_list = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getGDPRCheckedList();

// gdpr_privacy: privacy policy
// gdpr_term: Terms and Conditions
// gdpr_gdpr: GDPR Terms and Conditions
// gdpr_push_normal: consent to receive event push notifications
// gdpr_push_night: consent to receive nighttime event push notifications (only applicable in Korea)
// gdpr_adapp_custom: consent to see personalized ads (for countries where GDPR is applicable)
// gdpr_adapp_nocustom: consent to see non-personalized ads (for countries where GDPR is applicable)

Repayment pop-up feature for payment cancellation abusers

If you have set to automatically block Google payment cancellation abusers through the Payment cancellation menu in the dashboard, then you can set to display a repayment pop-up UI provided by the SDK to the abuser. If they repay the item, for which the payment was canceled, through the UI, then the block is automatically removed.

Use the following code to use the repayment pop-up feature for payment cancellation abusers.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    {
        //Types of themes
        // MATERIAL_RED,
        // MATERIAL_BLUE,
        // MATERIAL_CYAN,
        // MATERIAL_ORANGE,
        // MATERIAL_PURPLE,
        // MATERIAL_DARKBLUE,
        // MATERIAL_YELLOW,
        // MATERIAL_GRAPE,
        // MATERIAL_GRAY,
        // MATERIAL_GREEN,
        // MATERIAL_PEACH
        
        NVoidInfo info;
        info.theme = "MATERIAL_RED";
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->setVoidBuilder(info.ToJsonString());
    }
  • Define NVoidInfo
USTRUCT()
struct FNVoidInfo
{
    // Basic theme
    UPROPERTY()
    FString theme;
    
    // Background color (gradient)
    UPROPERTY()
    TArray<FString> headerBackGradient;
    
    // Subject
    UPROPERTY()
    FString headerTitle;
    
    // Subject color
    UPROPERTY()
    FString headerTitleColor;
    
    UPROPERTY()
    TArray<FString> contentBackGradient;
    
    UPROPERTY()
    TArray<FString> listHeaderBackGradient;  
    
    UPROPERTY()
    FString listHeaderTitleColor;
    
    UPROPERTY()
    TArray<FString> listContentBackGradient;
    
    UPROPERTY()
    FString listContentTitleColor;
   
   // Background color (gradient)
    UPROPERTY()
    TArray<FString> footerBackGradient;
    
    // Button background color (gradient)
    UPROPERTY()
    TArray<FString> footerButtonGradient;
    
    UPROPERTY()
    FString footerTitleColor;
    
    UPROPERTY()
    FString descHTML;
    
    UPROPERTY()
    FString descColor;
    
    UPROPERTY()
    FString listHeaderTitle;
    
    UPROPERTY()
    FString footerTitle;
}

Remote configuration feature

You can import the server parameter values registered in the Game > Remote configuration menu in the dashboard. If you import parameter values and use them in the SDK, then you can edit and control various elements without updating the game.

The imported parameters are loaded at login. You can call them after they have been loaded.

Use the following code to use the remote configuration feature.

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
{
    // "test_01": parameter FString
    FString value = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getConfig("test_01"); 

    //Import all parameters added in the dashboard in JSON string format.
    FString json_value = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getConfigs();
}

Game log transfer feature

You can call game logs and check them in the Game > Player menu in the dashboard.

To use the game log transfer feature, enter reserved words in the following code by referring to the table, and then call the code.

  • Reserved words and code
    Reserved words Required Type Description Maximum length
    FNSendLogCharacter.NAME Required FString Character name 128
    FNSendLogCharacter.LEVEL Optional FString Level 128
    FNSendLogCharacter.SERVER_ID Optional FString Server ID 128
    FNSendLogCharacter.PLAYER_ID selection FString Character ID 128
    FNSendLogCharacter.USERDATA selection FString Other Information 128
    USTRUCT()
    struct FNSendLogCharacter
    {
        UPROPERTY()
        FString NAME;
    
        UPROPERTY()
        FString PLAYER_ID;
    
        UPROPERTY()
        FString SERVER_ID;
    
        UPROPERTY()
        FString LEVEL;
    
        UPROPERTY()
        FString USERDATA;
    }
    
    
    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    {
        FNSendLogCharacter info;
        info.NAME = TEXT("tester");
        info.PLAYER_ID = TEXT("player_id");
    
        bool result = FGamePotSDKPluginModule::GetSharedGamePotSdk()->characterInfo(info.ToJsonString());
    
        // Result true: Validation succeeded. The logs are transferred to the GAMEPOT server.
        // Result false: Validation failed. Check the logcat.
    }
    

Set setUserData

Use it to add additional information to a member after logging in.
Maximum number of keys limited to 50
Maximum length of value limited to 1024 bytes
The information can only be viewed in the member details.

ex)
TSharedPtr<FJsonObject> JsonObject = MakeShareable(new FJsonObject);
JsonObject->SetStringField("appversion", "1.0.23");
JsonObject->SetStringField("server", "s1");

if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->setUserData(JsonObject);


void AGamePotSampleGameModeBase_Main::OnSetUserDataSuccess()
{
// Succeeded
}
void AGamePotSampleGameModeBase_Main::OnSetUserDataFailure(FNError NError)
{
// Failure
}

Integrate third party SDK

GAMEPOT Unreal SDK supports the linkage with third-party SDKs.

Integrate third party SDK login

To use the login feature by integrating a third-party SDK, enter parameter values in the following code by referring to the table, and then use that code.

  • Parameters and code

    • Since it doesn't support auto login, it needs to be called every time.
    Parameter name Required Type Description
    userid Required FString User unique ID
    ":" (colons) can't be used for this value
    FString userid = TEXT("memberid of 3rd party sdk");
    
    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->loginByThirdPartySDK(userid);
    

Integrate third party SDK payment

To use the payment feature by integrating a third-party SDK, enter parameter values in the following code by referring to the table, and then use that code.

  • Parameters and code
    Parameter name Required Type Description
    productid Required FString Item ID registered in the dashboard
    transactionid Required FString Payment receipt number (GPA-xxx-xxxx-xxxx)
    store Required Payment store (google, apple, one, galaxy)
    currency Optional FString Currency (KRW, USD)
    price Optional double Amount of purchased items
    paymentid Optional FString Payment ID
    Usually the same as store_id
    uniqueid Optional FString Unique ID used by the developer
    FString productId = "purchase_001";
    FString transactionId = "GPA-xxx-xxxx-xxxx";
    FString currency = "KRW";
    double price = 1200;
    FString paymentId = "google";
    FString uniqueId = "developer unique id";
    
    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    {
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->sendPurchaseByThirdPartySDK(FString productId, FString transactionId, FString currency, double price, FString store, FString paymentId, FString uniqueId);
    }