public void Load() { Reset(); var abilityList = AbilityList.CreateEmpty(); if (File.Exists(filePath)) { using (StreamReader streamReader = File.OpenText(filePath)) { var jsonString = streamReader.ReadToEnd(); abilityList = JsonUtility.FromJson <AbilityList>(jsonString); } } foreach (var ability in abilityList.Abilities) { set.Add(ability.AbilityName, ability); } }