v3.1.2
2020.3+
Class CurrencyDefinition
Represents a single currency configuration.
Inherited Members
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
Type | Description |
---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
Task<PlayerBalance> | A PlayerBalance object containing the currency balance for this currency. |