Class IAPDemoProductUI
Renders a Product
user interface, allowing purchasing, and display of
various hardcoded and retrieved pieces of data about this product.
Inherited Members
Namespace: Global Namespace
Syntax
public class IAPDemoProductUI : MonoBehaviour
Fields
descriptionText
The localized description of this product.
Declaration
public Text descriptionText
Field Value
Type | Description |
---|---|
Text |
priceText
The localized price, using the device's current country-specific app store.
Declaration
public Text priceText
Field Value
Type | Description |
---|---|
Text |
purchaseButton
Allows purchasing this product, when enabled for purchase.
Declaration
public Button purchaseButton
Field Value
Type | Description |
---|---|
Button |
receiptButton
Dumps the contents of this product's receipt to the log.
Declaration
public Button receiptButton
Field Value
Type | Description |
---|---|
Button |
statusText
Displays Available
or Unavailable
depending upon whether the backing app store
has record of this product identifier.
Declaration
public Text statusText
Field Value
Type | Description |
---|---|
Text |
titleText
The localized title of this product.
Declaration
public Text titleText
Field Value
Type | Description |
---|---|
Text |
Methods
PurchaseButtonClick()
Triggers the purchasing Action
for this identifier.
Declaration
public void PurchaseButtonClick()
ReceiptButtonClick()
Logs this Product.receipt.receipt
to the Debug.Log.Log
.
Declaration
public void ReceiptButtonClick()
SetPendingTime(Int32)
For testing PurchaseProcessingResult.Pending.Pending
, shows a time in seconds before
the IAPDemo
will complete the transaction for this product.
Declaration
public void SetPendingTime(int secondsRemaining)
Parameters
Type | Name | Description |
---|---|---|
Int32 | secondsRemaining | Shows a time in seconds in the user interface. |
See Also
SetProduct(Product, Action<String>)
Attach a Product
to this user interface element.
Declaration
public void SetProduct(Product p, Action<string> purchaseCallback)
Parameters
Type | Name | Description |
---|---|---|
Product | p | The product to be rendered. |
Action<String> | purchaseCallback | Triggered upon purchase initiation. |