How to set up a gui text box to count inventory items?

I have items scattered across the map on my game, and when you pick them up i have a script with an array that adds the items to an inventory. My question is, can i use the gui in unity to have a textbox show up that will actively show a counter showing how many of the items are in the inventory?

How about:

  guiText.text = inventoryArray.Length.ToString();

You need to fill in a few spots though. You need to get a reference to the inventory array before you can access it. And you might need a reference to guiText too depending where you put this script.
:slight_smile: