docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ProductMetadata

    Metadata for the product, namely that which is relevant to the store subsystem

    Inheritance
    object
    ProductMetadata
    AppleProductMetadata
    GoogleProductMetadata
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public class ProductMetadata

    Constructors

    ProductMetadata()

    Default constructor

    Declaration
    public ProductMetadata()

    ProductMetadata(string, string, string, string, decimal)

    Parametrized constructor

    Declaration
    public ProductMetadata(string priceString, string title, string description, string currencyCode, decimal localizedPrice)
    Parameters
    Type Name Description
    string priceString

    The price, as a string.

    string title

    The title of the product.

    string description

    The description of the product.

    string currencyCode

    The currency code of the localized price.

    decimal localizedPrice

    The localized price, by currency.

    ProductMetadata(ProductMetadata)

    Copy constructor

    Declaration
    public ProductMetadata(ProductMetadata productMetadata)
    Parameters
    Type Name Description
    ProductMetadata productMetadata

    The ProductMetadata, as an object.

    Properties

    isoCurrencyCode

    The product's currency in ISO 4217 format eg GBP, USD etc.

    Declaration
    public string isoCurrencyCode { get; }
    Property Value
    Type Description
    string

    localizedDescription

    Gets the localized description, as retrieved from the store subsystem; Apple, Google etc.

    Declaration
    public string localizedDescription { get; }
    Property Value
    Type Description
    string

    localizedPrice

    The product's price, denominated in the currency indicated by isoCurrencySymbol.

    Declaration
    public decimal localizedPrice { get; }
    Property Value
    Type Description
    decimal

    localizedPriceString

    Gets the localized price. This is the price formatted with currency symbol.

    Declaration
    public string localizedPriceString { get; }
    Property Value
    Type Description
    string

    The localized price string.

    localizedTitle

    Gets the localized title, as retrieved from the store subsystem; Apple, Google etc.

    Declaration
    public string localizedTitle { get; }
    Property Value
    Type Description
    string

    Methods

    ToString()

    Returns a string representation of the product metadata.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the product metadata.

    Overrides
    object.ToString()

    Extension Methods

    GetAppleProductMetadataExtension.GetAppleProductMetadata(ProductMetadata)
    GetGoogleProductMetadataExtension.GetGoogleProductMetadata(ProductMetadata)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)