Go To Console

Get Started with Unity

Download the TENTUPLAY Unity SDK

Download the TentuPlay Unity SDK Package.

Import the TENTUPLAY Unity SDK

Download the TentuPlay Unity SDK Package. In Unity Editor, click Menu > Assets > Import Package > Custom Package and select the downloaded SDK.

_TentuPlaySDKDemo
You can learn how to use TENTUPLAY SDK through the demo game.

TentuPlay
The core of TENTUPLAY. Dll files, scripts and prefabs are included.

Plugins
3rd party plugins to run TENTUPLAY.

TPAdviceTemplates
The template scripts and prefabs provided for the TENTUPLAY advice UI.

By clicking Import, TENTUPLAY package will be installed. After installation, TentuPlay menu will be creased in Unity Editor menu, and TentuPlay folder will be created in Assets folder.

Configure TentuPlay Settings

TENTUPLAY settings can be done in Unity Editor or a script.

How to Configure in Unity Editor:

To configure the SDK for use with your game, select TentuPlay - Edit Settings from the menu bar.

Api Key: The TentuPlay API Key for the authentication. You can create or get your project credential from TentuPlay Console - Project - Project Settings - General - Project Credentials.

Secret: The TentuPlay API Secret Key the authentication. You can create or get your project credential from TentuPlay Console - Project - Project Settings - General - Project Credentials.

Get Client Key: Get your Client Key by clicking the button. Client Key is a must for TentuPlay.

TentuPlay Debug Mode: Select this option to debug TENTUPLAY. Turn this option off for the deploy build. It may be redundant.

Auto Upload: Select this option to automatically upload data from clients' devices to the server. Auto Upload must be checked to upload data automatically. If Auto Upload is not checked, you must call the UploadData method to upload data.

※ Warning: Call TP functions only on main thread or turn off AutoUpload in settings and manually upload on mainthread.

Upload Interval (sec): The minimum interval for the upload. (Default value is set to 1200.)

Advice Sync Interval (sec): Minimum advice sync interval (default is 600 seconds) when using TentuPlay CRM.

Offer Sync Interval (sec): Minimum offer sync interval (default is 600 seconds) when using TentuPlay CRM.

How to Configure in the Script

Assign static fields of TentuPlaySettings class prior to the very first TentuPlay Class declaration, and you can configure TentuPlay Settings without TentuPlaySettings.asset.

using TentuPlay;
TentuPlaySettings.ClientKey= "MY_CLIENT_KEY";
TentuPlaySettings.DEBUG = true; // Default is false
TentuPlaySettings.AutoUpload = true; // Default is false
TentuPlaySettings.DeferredSendIntervalSec = 1200; // Default is 1200
TentuPlaySettings.AdvicesGetInterval= 600;
TentuPlaySettings.OffersGetInterval= 600;

// The first class or method called.

You can get your Client Key from CreateClientKey(string apiKey, string secret) method in TentuPlaySettingsEditor class. DO NOT hardcode your Api Key and Secret Key in your code.

Do you need help?

Do you have questions? Join TENTUPLAY Discord if you have any questions.