public static void purchaseThirdPayments(string productId, string uniqueId) { Debug.Log("[GPUnity][Call] purchaseThirdPayments - " + productId + ", " + uniqueId); #if UNITY_EDITOR { Debug.Log("GamePot - purchaseThirdPayments not supported"); } #elif UNITY_ANDROID GamePotUnityPluginAOS.purchaseThirdPayments(productId, uniqueId); #endif }
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 void submitScoreLeaderboard(string leaderBoardId, string leaderBoardScore) { Debug.Log("[GPUnity][Call] submitScoreLeaderboard - " + leaderBoardId + ", " + leaderBoardScore); #if UNITY_EDITOR { Debug.Log("GamePot - submitScoreLeaderboard not supported"); } #elif UNITY_ANDROID GamePotUnityPluginAOS.submitScoreLeaderboard(leaderBoardId, leaderBoardScore); #endif }
public static void loadAchievement() { Debug.Log("[GPUnity][Call] loadAchievement"); #if UNITY_EDITOR { Debug.Log("GamePot - loadAchievement not supported"); } #elif UNITY_ANDROID GamePotUnityPluginAOS.loadAchievement(); #endif }
public static void incrementAchievement(string achievementId, string count) { Debug.Log("[GPUnity][Call] incrementAchievement - " + achievementId + ", " + count); #if UNITY_EDITOR { Debug.Log("GamePot - incrementAchievement not supported"); } #elif UNITY_ANDROID GamePotUnityPluginAOS.incrementAchievement(achievementId, count); #endif }
public static void unlockAchievement(string achievementId) { Debug.Log("[GPUnity][Call] unlockAchievement - " + achievementId); #if UNITY_EDITOR { Debug.Log("GamePot - unlockAchievement not supported"); } #elif UNITY_ANDROID GamePotUnityPluginAOS.unlockAchievement(achievementId); #endif }
public static void showLeaderboard() { Debug.Log("[GPUnity][Call] showLeaderboard"); #if UNITY_EDITOR { Debug.Log("GamePot - showLeaderboard not supported"); } #elif UNITY_ANDROID GamePotUnityPluginAOS.showLeaderboard(); #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 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 }
public static string getLanguage() { string result = ""; #if UNITY_EDITOR Debug.Log("GamePot - UNITY EDITOR getLanguage always returns empty string"); #elif UNITY_IOS result = "ko-KR"; #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getLanguage(); #endif return(result); }
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 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 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 setVoidBuilder(NVoidInfo info) { Debug.Log("[GPUnity][Call] setVoidBuilder"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR setVoidBuilder not supported"); } #elif UNITY_IOS Debug.Log("GamePot - iOS setVoidBuilder not supported"); #elif UNITY_ANDROID GamePotUnityPluginAOS.setVoidBuilder(info != null ? info.ToJson().ToString() : null); #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 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 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 NPurchaseItem[] getPurchaseThirdPaymentsItems() { Debug.Log("[GPUnity][Call] getPurchaseThirdPaymentsItems"); string result = ""; #if UNITY_EDITOR { Debug.Log("GamePot - getPurchaseThirdPaymentsItems always returns empty"); } #elif UNITY_ANDROID result = GamePotUnityPluginAOS.getPurchaseThirdPaymentsItems(); #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 bool isUseLibrary(string libraryName) { Debug.Log("[GPUnity][Call] isUseLibrary"); #if UNITY_EDITOR { Debug.Log("GamePot - UNITY EDITOR isUseLibrary always return true"); return(true); } #elif UNITY_IOS { Debug.Log("GamePot - UNITY_IOS isUseLibrary not supported"); return(true); } #elif UNITY_ANDROID return(GamePotUnityPluginAOS.isUseLibrary(libraryName)); #endif }
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 }