Documentation
API Reference
Economy & Info API
Economy synchronization
Signature Behavior
FetchUpgradeInfo() Rebuilds flattened economy entries from the assigned Upgrade SO
DistributeAllCurrencies() Generates every configured currency cost series
IsFullyUpgraded() Delegates completion state to the linked Upgrade
Cost and affordability queries
Signature Returns
GetNextUpgradeCost(string currencyName) Next cost for a named currency
GetNextUpgradeCost(int currencyId) Next cost for a Wallet Currency ID
GetUpgradeCost(int globalIndex, string currencyName) Named cost at a flattened index
GetUpgradeCost(int bigIndex, int smallIndex, string currencyName) Named cost at nested indices
GetUpgradeCost(..., int currencyId) Equivalent ID-based overloads
CanAffordNextUpgrade() Whether the current payment mode can pay for the next step
CanAffordUpgrade(int globalIndex) Whether any valid Wallet option can pay
CanAffordUpgrade(int globalIndex, Currency chosenCurrency) Whether the supplied Currency can pay
Selection, progress and Buy Max
Signature Returns
GetAffordableOptionsForNext() List for Player Choice UI
GetPriorityAffordableCurrencyIndexForNext() Wallet index of the first priority option
GetPriorityAffordableCurrencyForNext() First priority Currency that can pay
GetProgressToNextUpgrade(string currencyName) Normalized balance progress toward next cost
GetProgressToNextUpgrade(int currencyId) ID-based equivalent
GetAffordableUpgradeCount(string currencyName) Sequential upgrade count affordable by name
GetAffordableUpgradeCount(int currencyId) Sequential upgrade count affordable by ID
GetWalletCurrencyById(int currencyId) Matching Wallet Currency or no match
Purchase methods and results
PurchaseResult
Every purchase returns a structured result.
success failReason currencyUsed amountDeducted
Economy events
Subscribe for transaction feedback and completion.
OnUpgradePurchased OnUpgradeFailed OnFullyUpgraded
Signature Behavior
PurchaseNextUpgrade() Selects payment according to Payment Mode and attempts the next purchase
PurchaseWithCurrency(Currency chosenCurrency) Attempts the next purchase using the supplied Wallet Currency
PurchaseWithCurrency(int currencyID) ID-based selected-currency overload
Info Provider synchronization and lookup
Signature Returns / behavior
FetchUpgradeInfo(bool preserveExisting) Rebuilds records and optionally preserves authored values
GetNextUpgradeInfo() SmallUpgradeInfo for the next progression step
GetUpgradeInfo(int globalIndex) SmallUpgradeInfo at flattened index
GetUpgradeInfo(int bigIndex, int smallIndex) SmallUpgradeInfo at nested indices
GetAllInfoForBig(int bigIndex) All SmallUpgradeInfo records in one group
GetBigUpgradeInfo(int bigIndex) BigUpgradeInfo for one group
CheckDirty() Checks whether source synchronization is stale
Custom field lookup
Signature Lookup
GetCustomField(SmallUpgradeInfo info, string tag) Small field by stable tag
GetCustomField(BigUpgradeInfo info, string tag) Big field by stable tag
GetCustomField(int globalIndex, string tag) Small field at flattened index
GetCustomFieldByIndex(SmallUpgradeInfo info, int fieldIndex) Small field by definition order
GetCustomFieldByIndex(BigUpgradeInfo info, int fieldIndex) Big field by definition order
Tip ยท Prefer stable tags
Tag-based lookup is clearer and more resilient than field-index lookup when custom definitions may be reordered during development.