I need to have 20 groups in my game. Let’s say each group can contain up to 10 gameObjets.
But ofc I don’t want to do:
HashSet<GameObject> group01 = new HashSet<GameObject>(); (HashSet is the same as List)
HashSet<GameObject> group02 = new HashSet<GameObject>();
HashSet<GameObject> group03 = new HashSet<GameObject>();
etc. Up to 20 let’s say. Is there a way to make it something like two dimensional so group[1,GameObject]. I know there are KeyValuePairs but how would I iterate over them? To let’s say find that group ID 3 let’s say and then iterate over those GameObject that are stored in that 3rd position