Class CodelessIAPButton
A GUI component for exposing the current price and allow purchasing of In-App Purchases. Exposes configurable elements through the Inspector.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.Purchasing
Assembly: solution.dll
Syntax
[AddComponentMenu("In-App Purchasing/IAP Button")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.purchasing@latest")]
public class CodelessIAPButton : BaseIAPButton
Fields
| Name | Description |
|---|---|
| button | |
| buttonType | The type of this button, can be either a purchase or a restore button. |
| consumePurchase | Consume the product immediately after a successful purchase. |
| onProductFetched | Event fired after a successful fetching the product information from the 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. |
| productId | Which product identifier to represent. Note this is not a store-specific identifier. |
Methods
| Name | Description |
|---|---|
| AddButtonToCodelessListener() | |
| GetPurchaseButton() | |
| IsARestoreButton() | |
| OnPurchaseComplete(Product) | |
| OnPurchaseFailed(Product, PurchaseFailureDescription) | 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() |