private bool LoadWords() { if (!wordsJsonFile) { return(false); } wordCollection = JsonUtility.FromJson <WordCollection>(wordsJsonFile.text); if (wordCollection == null) { return(false); } int subCollectionWordCount = 0; foreach (WordCollection.SubCollection subCollection in wordCollection.subCollections) { subCollectionWordCount += subCollection.words.Count; } if (subCollectionWordCount != wordCollection.words.Length) { wordCollection.FillSubCollections(); WriteToJsonFile(false); } return(true); }