Skip to main content
Version: v3

DLC Integration Guide

Querying and Purchasing DLC

Please download the TapSDK and add the following dependencies to your game:

You can add the SDK either manually or with the Unity Package Manager.

If you choose to use the Unity Package Manager, you should add the following dependencies into Packages/manifest.json:

"dependencies":{
"com.taptap.tds.common":"https://github.com/TapTap/TapCommon-Unity.git#3.28.3",
"com.taptap.tds.dlc": "https://github.com/TapTap/TapLicense-Unity.git#3.28.3",
"com.leancloud.storage": "https://github.com/leancloud/csharp-sdk-upm.git#storage-2.3.0",
}

If you choose to manually import the SDK, you should:

  • In the download page, click TapSDK Unity to download TapSDK-UnityPackage.zip.
  • Go to your Unity project, navigate to Assets > Import Package > Custom Package, select the TapTap_Common and TapTap_License modules from unzipped SDK.
  • Download LeanCloud-SDK-Storage-Unity.zip, unzip it as a Plugins folder, and drag and drop the folder into Unity.

DLC Callback Settings

public class MyTapDLCCallback:ITapDlcCallback
{
public void OnQueryCallBack(TapLicenseQueryCode code, Dictionary<string, object> queryList)
{

}

public void OnOrderCallBack(string sku, TapLicensePurchasedCode status)
{

}
}

TapLicense.SetDLCCallback(new MyTapDLCCallback());

Querying DLC

TapLicense.QueryDLC(string[] skuIds);

Purchasing DLC

TapLicense.PurchaseDLC(string skuId);

Parameters

TapLicenseQueryCode

CallbackCallback valueDescription
QUERY_RESULT_OK0Query succeeded
QUERY_RESULT_NOT_INSTALL_TAPTAP1TapTap is not installed on the device
QUERY_RESULT_ERR2Query failed
ERROR_CODE_UNDEFINED80000Unknown error

skuId

This is a unique ID assigned to each product. Please reach out to TapTap to have them set up.

Testing

To ensure that players are able to make purchases once you have released your game, please follow the instructions below to test the payment procedure

Upload APK

Upload the APK of your game to the TapTap Developer Center and wait for it to go through the review process.

Add Test Users

Go to TapTap Developer Center >> Click on Game Services >> Click on Game Ecosystem >> Click onCopyright Verification >> Enter the TapTap ID of the test user

Start Testing

Log in to the TapTap app on your device with the test account.

Start Selling

Complete Application Information

Go to TapTap Developer Center and fill in the application information, then wait for the review.

Set Prices

Go to TapTap Developer Center >> Price Settings, enable the feature, set up the prices, and submit everything for review.

Release Your Game

If everything worked out well, you may release your game.