docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Reward

    Reward

    Inheritance
    object
    Reward
    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 Reward

    Constructors

    Reward(string, int, object)

    Initializes a new instance of the Reward class.

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

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

    int amount

    The amount of the resource credited as part of the purchase. (required).

    object defaultInstanceData

    When the reward is an inventory item resource, this specifies instance data automatically saved against the new inventory item. Max size when serialised 5 KB. This property has been deprecated and will only return "null"..

    Properties

    Amount

    The amount of the resource credited as part of the purchase.

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

    The amount of the resource credited as part of the purchase.

    DefaultInstanceData

    When the reward is an inventory item resource, this specifies instance data automatically saved against the new inventory item. Max size when serialised 5 KB. This property has been deprecated and will only return "null".

    Declaration
    [Obsolete]
    [Preserve]
    public object DefaultInstanceData { get; set; }
    Property Value
    Type Description
    object

    When the reward is an inventory item resource, this specifies instance data automatically saved against the new inventory item. Max size when serialised 5 KB. This property has been deprecated and will only return "null".

    ResourceId

    The ID of a currency or inventory item resource that is credited as part of the purchase.

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

    The ID of a currency or inventory item resource that is credited 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)