v3.1.2
2020.3+

Class CurrencyDefinition

Represents a single currency configuration.

Inheritance
CurrencyDefinition
Namespace: Unity.Services.Economy.Model
Syntax
[Preserve]
public class CurrencyDefinition : ConfigurationItemDefinition

Fields

Initial

The amount of currency a player initially is given.

Declaration
[Preserve]
public int Initial
Field Value
TypeDescription
Int32

Max

(Optional, a value of 0 indicates no maximum) The maximum amount of this currency a player can own.

Declaration
[Preserve]
public int Max
Field Value
TypeDescription
Int32

Methods

GetPlayerBalanceAsync()

Gets the current balance of this currency for the currently signed in player. It is equivalent to the balance for this currency retrieved from EconomyService.Internal.PlayerBalances.GetBalancesAsync()

Declaration
public async Task<PlayerBalance> GetPlayerBalanceAsync()
Returns
TypeDescription
Task<PlayerBalance>

A PlayerBalance object containing the currency balance for this currency.