Unreal SDK
    • PDF

    Unreal SDK

    • PDF

    Article Summary

    Available in Classic and VPC

    This page describes how to use GAMEPOT Unreal SDK for developing games in Unreal. You can link 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. Log in to the dashboard with the admin account.
    2. Click the Download SDK > Unreal menus, in that order, and then click Download.

    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)
    

    Modify 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.

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

      ValueDescription
      gamepot_project_idProject ID issued from GAMEPOT.
      gamepot_storeStore value (google, one, or galaxy)
      gamepot_app_titleApp title (FCM)
      gamepot_push_default_channelDefault channel name registered - Do not change.
      facebook_app_idApp ID acquired from the Facebook console
      fb_login_protocol_schemeprotocol scheme fb[app_id] acquired from the Facebook console
      gamepot_naver_clientidGet from NAVER developer console
      gamepot_naver_secretidGet from NAVER developer console
      gamepot_line_channelidGet from the LINE developer console
      gamepot_twitter_consumerkeyGet from Twitter developer console
      gamepot_twitter_consumersecretGet from Twitter developer console
      gamepot_elsa_projectidProject ID when using NAVER Cloud ELSA
      gamepot_region주의! 게임팟 대시보드 생성 리전이 싱가포르인 경우에만 sg 입력
      gamepot_license_url주의! 게임팟 대시보드 생성 리전이 일본인경우 경우만 https://gamepot.apigw.ntruss.com/fw/jp-v1 입력
      <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)
          }
          ...
      }
        </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.

    The following describes how to set push notification icons.

    1. As shown below, create res/drawable folders respectively in the project path, and then add image files for each size.
    Folder nameCapacity
    $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
    1. Change the name of the image files 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.

    빌드시 버전 코드는 정수형태로 유니크하게 증가하는 방식으로 진행 부탁드립니다.

    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 variablesDescription
    gamepot_project_idProject ID issued from GAMEPOT.
    gamepot_facebook_app_idApp ID acquired from Facebook
    gamepot_facebook_display_nameName displayed in Facebook
    gamepot_google_app_idCLIENT_ID value of the GoogleService-Info file
    gamepot_google_url_schemesREVERSED_CLIENT_ID value of the GoogleService-Info file
    gamepot_naver_clientidNAVER client ID
    gamepot_naver_secretidNAVER secret ID
    gamepot_naver_urlschemeNAVER URL scheme
    gamepot_line_channelidLINE channel ID
    gamepot_line_url_schemesLINE URL scheme (line3rdp.{project bundle ID})
    gamepot_twitter_consumerkeyTwitter consumer key
    gamepot_twitter_consumersecretTwitter consumer secret
    gamepot_elsa_projectidProject ID when using NAVER Cloud ELSA
    gamepot_region주의! 게임팟 대시보드 생성 리전이 싱가포르인 경우에만 sg 입력
    gamepot_license_url주의! 게임팟 대시보드 생성 리전이 일본인경우 경우만 https://gamepot.apigw.ntruss.com/fw/jp-v1 입력
    1. Please add the option to obtain user permission below in Project settings' iOS > Extra Plist Data > Additional Plist Data menu.
    • 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>
    
    1. Compress GamePotResources.embeddedframework as .zip,
      add it to the path of $S(PluginDir)/ThirdParty/iOS/GamePotResources.embeddedframework.zip, and then 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.

    • Initialization 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();
         ...
      };
      


    • Initialization 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);
      
          // Call back the click action scheme on notice images (showNotice, showEvent)
          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;                    // Initialization failed
        static const int CODE_INVAILD_PARAM = 2;                    // Invalid parameter
        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;                 // Network module is not initialized
        static const int CODE_NETWORK_ERROR = 3001;                 // Network connection error or timeout occurred
        static const int CODE_SERVER_ERROR = 4000;                 // Server-side error
        static const int CODE_SERVER_HTTP_ERROR = 4001;                 // HTTP response code is not successful
        static const int CODE_SERVER_NETWORK_ERROR = 4002;                 // Network connection error or timeout occurred
        static const int CODE_SERVER_PARSING_ERROR = 4003;                 // Error occurred when parsing data received from the server
        static const int CODE_CHARGE_UNKNOWN_ERROR = 5000;                 // Unknown error occurred during payment or error is received from the store
        static const int CODE_CHARGE_PRODUCTID_EMPTY = 5001;                 // No product id is entered
        static const int CODE_CHARGE_PRODUCTID_WRONG = 5002;                 // Wrong product id is entered
        static const int CODE_CHARGE_CONSUME_ERROR = 5003;                 // Error occurred upon consuming
    
        UPROPERTY()
        int code;               // error Code
    
        UPROPERTY()
        FString message;        // error Message
    }
    

    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 acquired from the Google Firebase console to 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 file is applied correctly.
      • 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. Google-related CFBundleURLSchemes value added in 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>
    
    1. 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>
     ...
    
    1. Facebook-related CFBundleURLSchemes and LSApplicationQueriesSchemes values added 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, add the bEnableSignInWithAppleSupport=True flag value to the /Script/IOSRuntimeSettings.IOSRuntimeSettings item in the DefaultEngine.ini file located in the project's config path.

    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. It creates a MemberId to identify user information and returns the created information saved in FNUserInfo.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
    FGamePotSDKPluginModule::GetSharedGamePotSdk()->Login(ENLoginType::Type loginType);
    
    void ASampleGameModeBase::OnLoginSuccess(FNUserInfo NUserInfo)
    {
        // Login succeeded
    }
    
    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 (use this method 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 LoginType, 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;           // Member ID (unique user ID)                   
          UPROPERTY()
          FString name;               // Name
          UPROPERTY()
          FString profileUrl;         // Profile URL (if it exists)                     
          UPROPERTY()
          FString email;              // Email (if it exists)
          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: "maintenance" (check), "needupdate" (update)
      
          UPROPERTY()
          FString message;    // Maintenance settings: message entered in dashboard
      
          UPROPERTY()
          FString url;        // Maintenance settings: URL entered in the 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 the 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: starting time (timestamp)
      
          UPROPERTY()
          double endedAt;     // Maintenance: end time (timestamp)
      }
      

    Set permission request pop-up for acquiring 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

    For the iOS platform, the permission request pop-up window for acquiring IDFA value is requested when the login API is called. Please edit the function as shown below from the $S(PluginDir)/Private/iOS/IOSGamePotSdk.cpp file if you do not wish to call the pop-up request at the time of login.

    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 the API in use as Login with NAVER ID in the NAVER Developers console, register the app, and use the following code.

    • Android

      • Modify 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 Developers console as the gamepot_naver_clientid value, and the client secret in the gamepot_naver_secretid value
      • Add the gamepot-channel-naver.aar file to the project's $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 the 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>
      ...
      

    NAVER-related CFBundleURLSchemes and LSApplicationQueriesSchemes values added 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

      • Modify 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 and line-sdk-4.0.10.aar file to the project's $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 the 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>
      ...
      

    LINE-related CFBundleURLSchemes and LSApplicationQueriesSchemes values added 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.

    • Modify 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 $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, please refer to Request login validation.

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

    Account link feature

    Use the following code to use the link 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 linked to the account.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
         TArray<FNLinkingInfo> linkedList = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getLinkedList();
    
    
    //Define link information
    USTRUCT()
    struct FNLinkingInfo
    {
        UPROPERTY()
        ENLinkingType::Type provider;      // Information of connected accounts (e.g., Google, Facebook, NAVER, Apple)
    }
    }
    

    Linkage removal feature

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

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->deleteLinking(ENLinkingType::Type linkType);
    
    void ASampleGameModeBase::OnDeleteLinkingSuccess() {
    /// Account disconnection 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.

    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        TArray<FNPurchaseItem> itemList = FGamePotSDKPluginModule::GetSharedGamePotSdk()->getPurchaseItems();
    
    
    USTRUCT()
    struct FNPurchaseItem
    {
        UPROPERTY()
        FString productId;              // Product ID    
    
        UPROPERTY()
        FString type;                   // Product type. Fix as "inapp"
    
        UPROPERTY()
        FString price;                  // Google Store price: $0.99, 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 for whom the payment was made
    
    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;                  // ID of purchased item   
        UPROPERTY()
        FString currency;                    // Currency of the payment (KRW/USD) 
        UPROPERTY()
        FString orderId;                      // Store order ID    
        UPROPERTY()
        FString productName;            // Name of purchased item 
        UPROPERTY()
        FString gamepotOrderId;         // Order ID created in GAMEPOT    
        UPROPERTY()
        FString uniqueId;                    // Receipt ID separately managed by developer company  
        UPROPERTY()
        FString serverId;                    // Server ID of the character for whom the payment was made   
        UPROPERTY()
        FString playerId;                    // Character ID of the character for whom the payment was made
        UPROPERTY()
        FString etc;                         // Other information of the character for whom the purchase was made  
        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, please refer to Request item provision.

    My Card payment

    Please get the FacServiceID/Key values to link with My Card from My Card, and set them on the dashboard.

    1. Dashboard >> Payment >> IAP's store type: Google item > Add price > Enter currency (e.g., TWD)/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 other character information for whom the payment is made.
    
    if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
        FGamePotSDKPluginModule::GetSharedGamePotSdk()->purchase(FString productId, FString uniqueId, FString serverId, FString playerId, FString etc);
    
    • Use the API below 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 in your 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" // It only works if the store is Google.
    
    1. Check if gamepot-billing-mycard.aar is included in the ./ThirdParty/Android/libs/gamepot-billing-mycard.aar folder.

    External payment

    To link an external payment module, first complete setting it up by referring to Link 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 (use this method 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 res/drawable folders respectively in the path, and then add image files for each size.
    Folder nameCapacity
    $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
    1. 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 number
    
            FGamePotSDKPluginModule::GetSharedGamePotSdk()->coupon(FString couponNumber, FString userData); // Coupon number, 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, please refer to Request item provision.

    Push feature

    You can activate or deactivate normal push, night push, and ad push features, and use the local push feature.
    Set ad push settings to true if you'll be using the push feature. (If the ad push value is false, then push messages won't come through, regardless of 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 general push is allowed               
    
        UPROPERTY()
        bool night;         // Whether night push is enabled
    
        UPROPERTY()
        bool ad;            // Whether ad push is allowed
    }
    

    Local push feature

    You can display push notifications independently from the device, without going through the push message server.

    Use the following code to register push and display local push at a specified time.

        if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
             int pushId = FGamePotSDKPluginModule::GetSharedGamePotSdk()->sendLocalPush(FString date, FString title, FString message); 
    
    // date : (Format - timestamp "yyyy-MM-dd HH:mm:ss") 
    // ex >  DateTime.Parse("2018-01-01 00:00:00")
    //  title :  "title"
    // message :  "content"
    
    // The return value of the pushid is managed by the developer 
    

    Cancel registered local push

    Use the following code to cancel registered push using the pushid value acquired when registering the local push.

        if (FGamePotSDKPluginModule::IsGamePotSdkAvailable())
             bool success = FGamePotSDKPluginModule::GetSharedGamePotSdk()->cancelLocalPush(int /*pushId you got when adding 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 linking 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 linked to 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 linking 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 agreed to all required Terms and Conditions
            // NAgreeResultInfo.agreePush: true if checked to agree to receive (general) push notifications; otherwise, false
            // NAgreeResultInfo.agreeNight: true if checked to agree to receive night ad push notifications; otherwise, false
            // Set agreePush/agreeNight values at once through setPushStatus API after login is complete.
    }
    
    void ASampleGameModeBase::OnAgreeDialogFailure(FNError NError)
    {
        // Error triggered
    }
    
    • NAgreeInfo definition

      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.
      gamepotunreal002ko

    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 returning data format is the 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 night time event push notifications (only applicable in Korea)
    // gdpr_adapp_custom: consent to view personalized advertisement (for countries where GDPR is applicable)
    // gdpr_adapp_nocustom: consent to view non-personalized advertisement (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());
        }
    
    • NVoidInfo definition
    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 > Logs 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 wordsRequirement statusTypeDescriptionMaximum length
      FNSendLogCharacter.NAMERequiredFStringCharacter name128
      FNSendLogCharacter.LEVELOptionalFStringLevel128
      FNSendLogCharacter.SERVER_IDOptionalFStringServer ID128
      FNSendLogCharacter.PLAYER_IDOptionalFStringCharacter ID128
      FNSendLogCharacter.USERDATAOptionalFStringOther information128
      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.
      

      }

    setUserData settings

    Use when you want to add additional information to the member after login.
    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()
    {
    // Success
    }
    void AGamePotSampleGameModeBase_Main::OnSetUserDataFailure(FNError NError)
    {
    // Failure
    }
    

    Third-party SDK linkage

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

    Third-party SDK login linkage

    To use the login feature by linking 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 NameRequirement statusTypeDescription
      useridRequiredFStringUser 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);
      

    Third-party SDK payment linkage

    To use the payment feature by linking 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 NameRequirement statusTypeDescription
      productidRequiredFStringItem ID registered in the dashboard
      transactionidRequiredFStringPayment receipt number (GPA-xxx-xxxx-xxxx)
      storeRequiredStore for payment (google, apple, one, galaxy)
      currencyOptionalFStringCurrency (KRW, USD)
      priceOptionaldoubleAmount of purchased items
      paymentidOptionalFStringPayment ID
      Usually the same as store_id
      uniqueidOptionalFStringUnique 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);
      }
      

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.