docs.unity3d.com
    目次を表示する/隠す

    Class Product

    May be purchased as an In App Purchase.

    Inheritance
    Object
    Product
    Inherited Members
    Object.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Purchasing
    Syntax
    public class Product

    Properties

    availableToPurchase

    Determine if this product is available to purchase according to the store subsystem.

    This will be false if the product's identifier is unknown, incorrect or otherwise disabled with the store provider (ie Apple, Google et al).

    If this is false, purchase attempts will immediately fail.

    Declaration
    public bool availableToPurchase { get; }
    Property Value
    Type Description
    Boolean

    definition

    Basic immutable product properties.

    Declaration
    public ProductDefinition definition { get; }
    Property Value
    Type Description
    ProductDefinition

    hasReceipt

    Owned Non Consumables and Subscriptions should always have receipts. Consumable's receipts are not persisted between App restarts.

    Declaration
    public bool hasReceipt { get; }
    Property Value
    Type Description
    Boolean

    metadata

    Localized metadata provided by the store system.

    Declaration
    public ProductMetadata metadata { get; }
    Property Value
    Type Description
    ProductMetadata

    The metadata.

    receipt

    The purchase receipt for this product, if owned. For consumable purchases, this will be the most recent purchase receipt. Consumable receipts are not saved between app restarts. Receipts is in JSON format.

    Declaration
    public string receipt { get; }
    Property Value
    Type Description
    String

    transactionID

    A unique identifier for this product's transaction.

    This will only be set when the product was purchased during this session.

    Declaration
    public string transactionID { get; }
    Property Value
    Type Description
    String

    Methods

    Equals(Object)

    Check if this product is equal to another.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The product to compare with this object.

    Returns
    Type Description
    Boolean

    True if the products are equal

    Overrides
    Object.Equals(Object)

    GetHashCode()

    Get the unique Hash representing the product.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code as integer

    Overrides
    Object.GetHashCode()
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)