/// <summary> /// Construct the achievement database from the supplied JSON data /// </summary> /// <param name="json">JSON data</param> private void BuildDatabaseFromJSON(string json) { /* * Take the string of JSON and convert it into a list of achievements * achievementList is a list of Achievement, and our JSON file's * top-level array contains an achievement in each element */ achievements = JsonUtility.FromJson <AchievementCollection>(json); // Add each decoded achievement to the achievement database foreach (Achievement achievement in achievements.AchievementList) { Journal.Create(achievement); } }