Purpose: A UI component that automatically subscribes to currency changes in the Money manager and displays the current balance in a TextMeshPro text field.
TextMoney.SetMoneySource(Money money) changes the displayed wallet at runtime and safely re-subscribes to the selected Money reactive property.
TextMoney.SetMoneySaveKey(string saveKey) selects a wallet by Money.SaveKey.
- Empty key: use explicit
Money Source, thenMoney.I. - Non-empty key: display the first registered/found
Moneywith the matching save key.
- Add the
TextMoneycomponent to an object containing aTextMeshProtext component (Add Component > Neoxider > Shop > TextMoney). - Configure which balance type to display (current money, level money, or all money).
| Field | Description |
|---|---|
_displayMode |
Balance display mode: Money (main), LevelMoney (level only), AllMoney (total sum). |
_moneySource |
Currency source (Money component). If left empty, the global singleton Money.I is used. This is useful if you have multiple resource types (e.g., Energy, Stars) with their own local Money instances. |
amount |
(Info) The current displayed value. |
- Money - Currency manager.
- Module Root