- Home /
Dictionary key exists but corresponding value pair is non-existent
So I have Two scripts, One is my UIManager script that handles UI operations and another LoadModule script which loads up data from a json file, adds the info into a newly created Content object and loads them into a list which is then saved into a dictionary. So, it looks like this:
public class Content{
public string[] content;
public Content(string[] content){
this.content = new string[content.Length];
for(var i=0;i>
where I store the content objects. I use a GetComponent on the UIManager script to access the dictionary object. Most of the time I can get the List from the dictionary just fine. But occasionally there are instances where even though the dictionary entry is validated as existing inside the dictionary, the List that pops up is an empty one.
You're gonna have to show us the code how you load the dictionary in and how you get the lists.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Dictionary, List, Hashtable - Best Practices 1 Answer
How can I create a tree like list/array structure? 0 Answers