Class IAPButton
A GUI component for exposing the current price and allow purchasing of In-App Purchases. Exposes configurable elements through the Inspector.
Inherited Members
Namespace: UnityEngine.Purchasing
Assembly: solution.dll
Syntax
[Obsolete("IAPButton is deprecated, please use CodelessIAPButton instead.", false)]
[RequireComponent(typeof(Button))]
[AddComponentMenu("In-App Purchasing/IAP Button (legacy)", 2147483647)]
[HelpURL("https://docs.unity3d.com/Manual/UnityIAP.html")]
public class IAPButton : BaseIAPButton
Fields
| Name | Description |
|---|---|
| buttonType | The type of this button, can be either a purchase or a restore button. |
| consumePurchase | Consume the product immediately after a successful purchase. |
| descriptionText | Displays the localized description from the app store. |
| onPurchaseComplete | Event fired after a successful purchase of this product. |
| onPurchaseFailed | Event fired after a failed purchase of this product. |
| onTransactionsRestored | Event fired after a restore transactions. |
| priceText | Displays the localized price from the app store. |
| productId | Which product identifier to represent. Note this is not a store-specific identifier. |
| titleText | Displays the localized title from the app store. |
Methods
| Name | Description |
|---|---|
| AddButtonToCodelessListener() | |
| GetPurchaseButton() | |
| IsARestoreButton() | |
| OnPurchaseComplete(Product) | |
| OnPurchaseFailed(Product, PurchaseFailureReason) | Invoked on a failed purchase of the product associated with this button |
| OnTransactionsRestored(bool, string) | |
| ProcessPurchase(PurchaseEventArgs) | Invoke to process a successful purchase of the product associated with this button. |
| RemoveButtonToCodelessListener() | |
| ShouldConsumePurchase() |