Hi there
I have simple player inventory model with list of items, like List<InventoryItem> _items;
And I have UI Text (TMP) with Localize String Event & assigned string reference on it (text like “Items: {items}”)
When player pressing button (for example Tab) the Text show up, so my question is: how to pass param {items} to this text which means _items.Count
considering that the number of items in the inventory may change?
I’ve tried to use
text.Arguments = new object[]
{
_items.Count
};
text.RefreshString();
and
text.Add("items", new IntVariable { Value = _items.Count });
but getting error FormattingException: Error parsing format string: Could not evaluate the selector "items" at 11