Quantcast
Channel: Answers for "Storing and Removing GameObjects - List or Dictionary?"
Viewing all articles
Browse latest Browse all 5

Answer by adriandevera

$
0
0
**EDIT: I thought I was posting a comment, please change this to a comment instead of an answer. Sorry.** Does anyone know how to destroy game objects from a dictionary? Public Dictionary gridDictionary = new Dictionary (); if(!gridDictionary.ContainsValue(pos)){ gridDictionary.Add((GameObject)Instantiate(blueGridPrefab, pos, transform.rotation),pos); }else{ gameobject = gridDictionary.getKeyThatContains(pos)// ???? How do I do this gameobject.Destroy(); }

Viewing all articles
Browse latest Browse all 5

Trending Articles



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