Quantcast
Viewing latest article 6
Browse Latest Browse All 131

Two dimensional HashSet/List

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 group01 = new HashSet(); (HashSet is the same as List) HashSet group02 = new HashSet(); HashSet group03 = new HashSet(); 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

Viewing latest article 6
Browse Latest Browse All 131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>