public void ParseCSVData <T>(string tableName) where T : Data
        {
            Reset();

            CsvTableHandler.ResourcePath = dialogRootPath;

            CsvTableHandler.Table CSVTable = CsvTableHandler.Get(tableName, CsvTableHandler.StreamMode.Resource);


            dialogDatas = new List <Data>(CSVTable.Length);
            dialogDatas.AddRange(CSVTable.ConvertoGenericList <T>());
        }
예제 #2
0
        public void ParseCSVData(string rootpath, string parseTypeName, string tableName)
        {
            Reset();

            CsvTableHandler.ResourcePath = rootpath;

            CsvTableHandler.Table CSVTable = CsvTableHandler.Get(tableName, CsvTableHandler.StreamMode.Resource);

            Type ParseType = Type.GetType(parseTypeName);

            if (ParseType == null)
            {
                Debug.Log("Parsed Type is not Correct,Requested TypeName is :Namespace." + parseTypeName);
                Debug.Break();
            }

            dialogDatas = new List <Data>(CSVTable.Length);

            for (int i = 0; i < CSVTable.Length; i++)
            {
                dialogDatas.Add((Data)CSVTable.GetAt(i).CovertToParsedRow(ParseType));
            }
        }