docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EconomyReference

    A reference to another resource definition from within a purchase.

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

    Constructors

    EconomyReference(ConfigurationItemDefinition)

    Declaration
    [Preserve]
    [JsonConstructor]
    public EconomyReference(ConfigurationItemDefinition configItem)
    Parameters
    Type Name Description
    ConfigurationItemDefinition configItem

    Methods

    GetReferencedConfigurationItem()

    Gets the referenced configuration item, which will automatically be deserialized to its target type.

    You can cast to this type by checking the Type parameter of the returned ConfigurationItemDefinition, and then casting to either InventoryItemDefinition or CurrencyDefinition as appropriate.

    Declaration
    [Preserve]
    public ConfigurationItemDefinition GetReferencedConfigurationItem()
    Returns
    Type Description
    ConfigurationItemDefinition

    Either a CurrencyDefinition or an InventoryItemDefinition, depending on the underlying item Type.

    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)