docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Cost

    Cost

    Inheritance
    object
    Cost
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Economy
    Assembly: solution.dll
    Syntax
    [Preserve]
    public class Cost

    Constructors

    Cost(string, int)

    Initializes a new instance of the Cost class.

    Declaration
    [Preserve]
    public Cost(string resourceId = null, int amount = 0)
    Parameters
    Type Name Description
    string resourceId

    The ID of the currency or inventory item that is deducted as part of the purchase. (required).

    int amount

    The amount of the item deducted as part of the purchase. (required).

    Properties

    Amount

    The amount of the item deducted as part of the purchase.

    Declaration
    [Preserve]
    public int Amount { get; set; }
    Property Value
    Type Description
    int

    The amount of the item deducted as part of the purchase.

    ResourceId

    The ID of the currency or inventory item that is deducted as part of the purchase.

    Declaration
    [Preserve]
    public string ResourceId { get; set; }
    Property Value
    Type Description
    string

    The ID of the currency or inventory item that is deducted as part of the purchase.

    In This Article
    Back to top
    Copyright © 2024 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)