Thanks for the reply! Let me be a bit more specific:
I have a dictionary containing in-game currencies. I'd like to use a text object to show these currencies.
When adding a new currency to the dictionary, I'd like to add its CurrentKey and CurrentValue to the text object.
If the text object already has such key, I'd like it to only add its CurrentValue.
I hope this makes sense, I'm pretty stuck at this and it might be a suboptimal approach. If you have a better method I'm all ears.
Thanks again.
Instead of checking the Txt object if has the key you need to keep track of the Printed (Keys & Values), for this, I will just check if the Key exists will be much easier:
Example:
On Currency Check:
--------- Dictionary has Key?
-----------------If Yes: add the value to the existing value in the dictionary and then clear the Txt to Print all currency (Key & Values) again
----------------- Else Key Doesn't Exist: add the new (Key and Value) to the dictionary then Update the Txt object with a new line and print the new (Key & Value)
This is so to avoid updating every tick the Txt object