public string GetProductPrice(GameProduct productType) { string productPrice = null; string productId = GetProductId(productType); if (productId != null) { IABProduct product = FindProduct(productId); if (product != null) { productPrice = product.price; } } #if UNITY_DEBUG if (productPrice == null) { productPrice += "$1.99 *"; } #endif return(productPrice != null ? productPrice : string.Empty); }
public string GetProductTitle(GameProduct productType) { string productTitle = null; string productId = GetProductId(productType); if (productId != null) { IABProduct product = FindProduct(productId); if (product != null) { productTitle = product.title; } } if (productTitle == null) { productTitle = GetFallbackProductName(productType); #if UNITY_DEBUG productTitle += " *"; #endif } return(productTitle); }
public string GetProductDescription(GameProduct productType) { string productDescription = null; string productId = GetProductId(productType); if (productId != null) { IABProduct product = FindProduct(productId); if (product != null) { productDescription = product.description; } } if (productDescription == null) { productDescription = GetFallbackProductDescription(productType); #if UNITY_DEBUG productDescription += " *"; #endif } return(productDescription != null ? productDescription : string.Empty); }