Gamebase SDK for Unity  1.14.2
Toast Gamebase Platform

◆ Initialize() [2/2]

static void Initialize ( GamebaseRequest.GamebaseConfiguration  configuration,
GamebaseCallback.GamebaseDelegate< GamebaseResponse.Launching.LaunchingInfo >  callback 
)
static

This function initialize the Gamebase SDK with Gamebase configuration.

If this function is not called, the Gamebase SDK function will not work.

Since
Added 1.6.0
Parameters
configurationSettings for the Gamebase SDK.
callbackThe callback provided will return a LaunchingInfo object that contains the infomations of Gamebase.

Example Usage :

public void Initialize(string appID, string appVersion, string displayLanguage, bool enablePopup, bool enableLaunchingStatusPopup, bool enableBanPopup, string storeCode, string fcmSenderId)
{
var configuration = new GamebaseRequest.GamebaseConfiguration();
configuration.appID = appID;
configuration.appVersion = appVersion;
configuration.zoneType = "real";
configuration.displayLanguage = displayLanguage;
configuration.enablePopup = enablePopup;
configuration.enableLaunchingStatusPopup = enableLaunchingStatusPopup;
configuration.enableBanPopup = enableBanPopup;
configuration.storeCode = storeCode;
configuration.fcmSenderId = fcmSenderId;
Gamebase.Initialize(configuration, (launchingInfo, error) =>
{
if (Gamebase.IsSuccess(error))
{
Debug.Log("Gamebase initialization succeeded.");
}
else
{
Debug.Log(string.Format("Gamebase initialization failed. error is {0}", error));
}
});
}