public static void setLanguage(NCommon.GameLanguage gameLanguage) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR setLanguage not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.setLanguage((int)gameLanguage); #elif UNITY_ANDROID GamePotUnityPluginAOS.setLanguage((int)gameLanguage); #endif }
public static bool isLinked(string linkType) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR always returns isLinked false"); } return(false); #elif UNITY_IOS return(GamePotUnityPluginiOS.isLinked(linkType)); #elif UNITY_ANDROID return(GamePotUnityPluginAOS.isLinked(linkType)); #endif }
public static void cancelLocalPush(string pushId) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR cancelLocalPush not supported"); } return; #elif UNITY_IOS GamePotUnityPluginiOS.cancelLocalPush(Int32.Parse(pushId)); #elif UNITY_ANDROID GamePotUnityPluginAOS.cancelLocalPush(Int32.Parse(pushId)); #endif }
//send Local Push public static int sendLocalPush(DateTime sendDate, string title, string message) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR sendLocalPush always return -1"); } return(-1); #elif UNITY_IOS return(GamePotUnityPluginiOS.sendLocalPush(sendDate.ToString("yyyy-MM-dd HH:mm:ss"), title, message)); #elif UNITY_ANDROID return(GamePotUnityPluginAOS.sendLocalPush(sendDate, title, message)); #endif }
public static void loginByThirdPartySDK(string userId) { Debug.Log("[GPUnity][Call] loginByThirdPartySDK"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR loginByThirdPartySDK not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.loginByThirdPartySDK(userId); #elif UNITY_ANDROID GamePotUnityPluginAOS.loginByThirdPartySDK(userId); #endif }
public static void sendPurchaseByThirdPartySDK(string productId, string transactionId, string currency, double price, string store, string paymentId, string uniqueId) { Debug.Log("[GPUnity][Call] sendPurchaseByThirdPartySDK"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR sendPurchaseByThirdPartySDK not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.sendPurchaseByThirdPartySDK(productId, transactionId, currency, price, store, paymentId, uniqueId); #elif UNITY_ANDROID GamePotUnityPluginAOS.sendPurchaseByThirdPartySDK(productId, transactionId, currency, price, store, paymentId, uniqueId); #endif }
public static void showFaq() { Debug.Log("[GPUnity][Call] showFaq"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR showFaq not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.showFaq(); #elif UNITY_ANDROID GamePotUnityPluginAOS.showFaq(); #endif }
public static void e(string errCode, string errMessage) { Debug.Log("[GPUnity][Call] e"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR sendLog not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.sendLog("e", errCode, errMessage); #elif UNITY_ANDROID GamePotUnityPluginAOS.sendLog("e", errCode, errMessage); #endif }
public static void showAppStatusPopup(string status) { Debug.Log("[GPUnity][Call] showAppStatusPopup - " + status); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR showAppStatusPopup not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.showAppStatusPopup(status); #elif UNITY_ANDROID GamePotUnityPluginAOS.showAppStatusPopup(status); #endif }
public static void setLoggerUserid(string userid) { Debug.Log("[GPUnity][Call] setLoggerUserid"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR sendLog not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.setLoggerUserid(userid); #elif UNITY_ANDROID GamePotUnityPluginAOS.setLoggerUserid(userid); #endif }
public static void showNotice(bool showTodayButton) { Debug.Log("[GPUnity][Call] showNotice"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR showNotice not supported"); } #elif UNITY_IOS GamePotUnityPluginiOS.showNotice(showTodayButton); #elif UNITY_ANDROID GamePotUnityPluginAOS.showNotice(showTodayButton); #endif }
public static string getConfigs() { string result = ""; #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR getConfigs always returns empty"); } #elif UNITY_IOS result = GamePotUnityPluginiOS.getConfigs(); #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getConfigs(); #endif return(result); }
public static NPurchaseItem[] getPurchaseItems() { string result = ""; #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR getPurchaseItems always returns empty"); } #elif UNITY_IOS result = GamePotUnityPluginiOS.getPurchaseItems(); #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getPurchaseItems(); #endif NPurchaseItem[] itemData = JsonMapper.ToObject <NPurchaseItem[]>(result); return(itemData); }
public static void initPlugin() { #if UNITY_EDITOR { if (GamePotEventListener.s_instance == null) { Debug.Log("GamePot - Creating GamePot Native Bridge Receiver"); new GameObject("GamePotManager", typeof(GamePotEventListener)); } } #elif UNITY_IOS GamePotUnityPluginiOS.initPlugin(); #elif UNITY_ANDROID GamePotUnityPluginAOS.initPlugin(); #endif }
public static NCommon.LoginType getLastLoginType() { string result = ""; #if UNITY_EDITOR Debug.Log("GamePot - UNITY EDITOR getLastLoginType always returns NONE"); #elif UNITY_IOS result = GamePotUnityPluginiOS.getLastLoginType(); #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getLastLoginType(); #endif switch (result) { case "GOOGLE": return(NCommon.LoginType.GOOGLE); case "GOOGLEPLAY": return(NCommon.LoginType.GOOGLEPLAY); case "FACEBOOK": return(NCommon.LoginType.FACEBOOK); case "NAVER": return(NCommon.LoginType.NAVER); case "GAMECENTER": return(NCommon.LoginType.GAMECENTER); case "TWITTER": return(NCommon.LoginType.TWITTER); case "LINE": return(NCommon.LoginType.LINE); case "APPLE": return(NCommon.LoginType.APPLE); case "GUEST": return(NCommon.LoginType.GUEST); case "THIRDPARTYSDK": return(NCommon.LoginType.THIRDPARTYSDK); } return(NCommon.LoginType.NONE); }
public static string getPushToken() { Debug.Log("[GPUnity][Call] getFCMToken"); string token = ""; #if UNITY_EDITOR { Debug.Log("GamePot - getFCMToken always returns empty string"); } #elif UNITY_IOS token = GamePotUnityPluginiOS.getPushToken(); #elif UNITY_ANDROID token = GamePotUnityPluginAOS.getFCMToken(); #endif return(token); }
public static void deleteMember() { #if UNITY_EDITOR Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK deleteMember always success"); // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { GamePotEventListener.s_instance.onDeleteMemberSuccess(); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } #elif UNITY_IOS GamePotUnityPluginiOS.deleteMember(); #elif UNITY_ANDROID GamePotUnityPluginAOS.deleteMember(); #endif }
public static NPushInfo getPushStatus() { Debug.Log("[GPUnity][Call] getPushStatus"); string result = ""; #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR getPushStatus always returns empty"); } #elif UNITY_IOS result = GamePotUnityPluginiOS.getPushStatus(); #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getPushStatus(); #endif Debug.Log("[GPUnity][Call] getPushStatus result : " + result); NPushInfo pushInfo = JsonMapper.ToObject <NPushInfo>(result); return(pushInfo); }
public static void showWebView(string url) { Debug.Log("[GPUnity][Call] showWebView url : " + url); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR showWebView not supported"); } #elif UNITY_IOS { GamePotEventListener listener = GamePotEventListener.s_instance; GamePotUnityPluginiOS.showWebView(url); // IOS doesn't return Any Callback listener.onWebviewClose(""); } #elif UNITY_ANDROID { GamePotUnityPluginAOS.showWebView(url); } #endif }
public static void deleteLinking(NCommon.LinkingType linkType) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK deleteLinking always faulure"); // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { GamePotEventListener.s_instance.onDeleteLinkingFailure(""); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } #elif UNITY_IOS GamePotUnityPluginiOS.deleteLinking(linkType); #elif UNITY_ANDROID GamePotUnityPluginAOS.deleteLinking(linkType); #endif }
public static void purchase(string productId, string uniqueId, string serverId, string playerId, string etc) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK purchase always cancelled"); // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { GamePotEventListener.s_instance.onPurchaseCancel(); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } #elif UNITY_IOS GamePotUnityPluginiOS.purchase(productId, uniqueId, serverId, playerId, etc); #elif UNITY_ANDROID GamePotUnityPluginAOS.purchase(productId, uniqueId, serverId, playerId, etc); #endif }
public static void coupon(string couponNumber, string userData) { #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK coupon always success"); // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { GamePotEventListener.s_instance.onCouponSuccess(""); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } #elif UNITY_IOS GamePotUnityPluginiOS.coupon(couponNumber, userData); #elif UNITY_ANDROID GamePotUnityPluginAOS.coupon(couponNumber, userData); #endif }
public static void setPushNightStatus(bool nightPushEnable) { Debug.Log("[GPUnity][Call] setPushNightStatus : " + nightPushEnable); #if UNITY_EDITOR { // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { GamePotEventListener.s_instance.onPushNightSuccess(); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } #elif UNITY_IOS GamePotUnityPluginiOS.setPushNight(nightPushEnable); #elif UNITY_ANDROID GamePotUnityPluginAOS.setPushNight(nightPushEnable); #endif }
public static void setPushStatus(bool pushEnable) { Debug.Log("[GPUnity][Call] setPushStatus : " + pushEnable); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK setPush always success"); // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { GamePotEventListener.s_instance.onPushSuccess(); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } #elif UNITY_IOS GamePotUnityPluginiOS.setPush(pushEnable); #elif UNITY_ANDROID GamePotUnityPluginAOS.setPush(pushEnable); #endif }
public static void login(NCommon.LoginType loginType) { #if UNITY_EDITOR { GamePotEventListener listener = GamePotEventListener.s_instance; if (loginType == NCommon.LoginType.GUEST) { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK login with GUEST. It does not communicate with server."); // Temporary user info for UnityEditor Development mode if (listener != null) { NUserInfo userInfo = new NUserInfo { memberid = "UE-" + SystemInfo.deviceUniqueIdentifier, userid = "UE-" + SystemInfo.deviceUniqueIdentifier, name = "UnityEditor", token = "UnityEditorTempToken" }; GamePotSettings.MemberInfo = userInfo; listener.onLoginSuccess(userInfo.ToJson()); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } else { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK login cancelled"); listener.onLoginCancel(); } } #elif UNITY_IOS GamePotUnityPluginiOS.login(loginType); #elif UNITY_ANDROID GamePotUnityPluginAOS.login(loginType); #endif }
public static bool characterInfo(GamePotSendLogCharacter info) { Debug.Log("[GPUnity][Call] characterInfo"); bool result = false; if (info == null) { Debug.Log("GamePotSendLogCharacter is null"); return(false); } #if UNITY_EDITOR { Debug.Log("GamePot - characterInfo always returns false"); } #elif UNITY_IOS result = GamePotUnityPluginiOS.characterInfo(info.toString()); #elif UNITY_ANDROID result = GamePotUnityPluginAOS.characterInfo(info.toString()); #endif return(result); }
public static void showAgreeDialog(NAgreeInfo info) { Debug.Log("[GPUnity][Call] showAgreeDialog"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR DUMMY CALLBACK showAgreeDialog always success"); // Temporary user info for UnityEditor Development mode if (GamePotEventListener.s_instance != null) { string successResultJson = "{\"agree\":true,\"agreeNight\":true}"; GamePotEventListener.s_instance.onAgreeDialogSuccess(successResultJson); } else { Debug.LogError("GamePot UnityEditor listener is NULL"); } } #elif UNITY_IOS GamePotUnityPluginiOS.showAgreeDialog(info != null ? info.ToJson().ToString() : null); #elif UNITY_ANDROID GamePotUnityPluginAOS.showAgreeDialog(info != null ? info.ToJson().ToString() : null); #endif }
public static List <NLinkingInfo> getLinkedList() { string result = ""; #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR always returns empty linked list"); } #elif UNITY_IOS result = GamePotUnityPluginiOS.getLinkedList(); #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getLinkedList(); #endif JsonData data = JsonMapper.ToObject(result); List <NLinkingInfo> itemData = new List <NLinkingInfo>(); if (data.IsArray || data.IsObject) { foreach (JsonData item in data) { Debug.Log("GamePot::getLinkedList-" + item["provider"]); NLinkingInfo info = new NLinkingInfo(); if (item["provider"].ToString() == "google") { info.provider = NCommon.LinkingType.GOOGLE; } else if (item["provider"].ToString() == "facebook") { info.provider = NCommon.LinkingType.FACEBOOK; } else if (item["provider"].ToString() == "naver") { info.provider = NCommon.LinkingType.NAVER; } else if (item["provider"].ToString() == "googleplay") { info.provider = NCommon.LinkingType.GOOGLEPLAY; } else if (item["provider"].ToString() == "gamecenter") { info.provider = NCommon.LinkingType.GAMECENTER; } else if (item["provider"].ToString() == "line") { info.provider = NCommon.LinkingType.LINE; } else if (item["provider"].ToString() == "twitter") { info.provider = NCommon.LinkingType.TWITTER; } else if (item["provider"].ToString() == "apple") { info.provider = NCommon.LinkingType.APPLE; } else if (item["provider"].ToString() == "thirdpartysdk") { info.provider = NCommon.LinkingType.THIRDPARTYSDK; } itemData.Add(info); } } return(itemData); }