v3.1.2
2020.3+
Class EconomyReference
A reference to another resource definition from within a purchase.
Namespace: Unity.Services.Economy.Model
Syntax
[Preserve]
public class EconomyReference
Constructors
EconomyReference(ConfigurationItemDefinition)
Declaration
[Preserve]
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. |