/// <summary> /// Tries to open the purchase dialog this product via Unity IAP. /// </summary> public void Purchase() { #if UNITY_PURCHASING if (!buyable) { return; } UnityIAPManager.PurchaseProduct(id); #endif }
/// <summary> /// Tries to open the purchase dialog this product via Unity IAP. /// </summary> public void Purchase() { #if UNITY_ANALYTICS if (!buyable) { return; } UnityIAPManager.PurchaseProduct(id); #endif }
/// <summary> /// Tries to open the purchase dialog this product via Unity IAP. /// </summary> public void Purchase(int money) { if (uimain.MoneyAmount > money) { #if UNITY_ANALYTICS if (!buyable) { return; } UnityIAPManager.PurchaseProduct(id); #endif uimain.MoneyAmount -= money; } }