public void Purchase(string productName) { if (IAPManager.Instance.IsInitialized()) { IAPManager.Instance.PurchaseWithName(productName); } else { MobileNativeAlert.CreateOneButtonAlert("Service Unavailable", "Please check your internet connection.", "OK"); } }
public void RestorePurchases() { if (IAPManager.Instance.IsInitialized()) { IAPManager.Instance.RestorePurchases(); } else { MobileNativeAlert.CreateOneButtonAlert("Service Unavailable", "Please check your internet connection.", "OK"); } }
public void ShowAchievementUI() { if (GameServiceManager.Instance.IsInitialized) { GameServiceManager.Instance.ShowAchievementsUI(); } else { #if UNITY_IOS MobileNativeAlert.CreateOneButtonAlert("Service Unavailable", "The player is not signed in to Game Center.", "OK"); #elif UNITY_ANDROID GameServiceManager.Instance.Init(); #endif } }
// RestoreCompleted event is only fired on iOS devices. void OnRestoreCompleted() { MobileNativeAlert.CreateOneButtonAlert("Restore Completed", "Your purchases were restored successfully.", "OK"); }