This function initialize the Gamebase SDK with Gamebase configuration.
If this function is not called, the Gamebase SDK function will not work.
public void InitializeWithConfigurationSample(string appID, string appVersion)
{
var configuration = new GamebaseRequest.GamebaseConfiguration();
configuration.appID = appID;
configuration.appVersion = appVersion;
configuration.displayLanguageCode = GamebaseDisplayLanguageCode.English;
#if UNITY_ANDROID
configuration.storeCode = GamebaseStoreCode.GOOGLE;
#elif UNITY_IOS
configuration.storeCode = GamebaseStoreCode.APPSTORE;
#elif UNITY_WEBGL
configuration.storeCode = GamebaseStoreCode.WEBGL;
#elif UNITY_STANDALONE
configuration.storeCode = GamebaseStoreCode.WINDOWS;
#else
configuration.storeCode = GamebaseStoreCode.WINDOWS;
#endif
{
{
Debug.Log("Initialization succeeded.");
var notice = launchingInfo.launching.notice;
if (notice != null)
{
if (string.IsNullOrEmpty(notice.message) == false)
{
Debug.Log(string.Format("title:{0}", notice.title));
Debug.Log(string.Format("message:{0}", notice.message));
Debug.Log(string.Format("url:{0}", notice.url));
}
}
var status = launchingInfo.launching.status;
if (status.code == GamebaseLaunchingStatus.IN_SERVICE)
{
}
else
{
switch (status.code)
{
case GamebaseLaunchingStatus.RECOMMEND_UPDATE:
{
break;
}
case GamebaseLaunchingStatus.INTERNAL_SERVER_ERROR:
{
break;
}
}
}
}
else
{
Debug.Log(string.Format("Initialization failed. error is {0}", error));
if (error.code == GamebaseErrorCode.LAUNCHING_UNREGISTERED_CLIENT)
{
GamebaseResponse.Launching.UpdateInfo updateInfo = GamebaseResponse.Launching.UpdateInfo.From(error);
if (updateInfo != null)
{
}
}
}
});
}
static void Initialize(GamebaseCallback.GamebaseDelegate< GamebaseResponse.Launching.LaunchingInfo > callback)
This function initialize the Gamebase SDK with inspector settings.
Definition Gamebase.cs:136
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11