private static bool _LoadDataTable(string path, ref Dictionary <int, RankData> table) { TextAsset tableFile = Resources.Load <TextAsset>(path); if (tableFile == null) { return(false); } string[] line = tableFile.text.Split('\n'); for (int i = 1; i < line.Length - 1; i++) { string[] colum = line[i].Split(','); RankData data = new RankData(); FieldInfo[] infos = data.GetType().GetFields(BindingFlags.NonPublic | BindingFlags.Instance); infos[0].SetValue(data, int.Parse(colum[0])); infos[1].SetValue(data, int.Parse(colum[1])); table.Add(data.Rank, data); } return(true); }