- Home /
Question by
awesomeness101forever · Feb 09, 2021 at 03:27 PM ·
dictionary
Find All Keys with the Same Value as Another Key
I have a dictionary where the keys are gameobjects and the values are their transforms. How do I find all of the gameobjects in this dictionary that have the same transform, or to put it into more general terms: how do I find all the keys that have the same value as another key?
For example, say I had a dictionary with these keys and values:
gobj1, A
gobj2, B
gobj3, B
gobj4, C
gobj5, A
When I run the script, I want to get the gameobjects gobj1, gobj2, gobj3, and gobj5.
Comment