Пример #1
0
    public void Start()
    {
        var tables = Resources.LoadAll(TablesPath);

        Debug.Log(tables);
        foreach (var table in tables)
        {
            Debug.Log(table);
            TextAsset text = table as TextAsset;

            var newtable  = new CSVTable();
            var lineArray = text.text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
            //title
            newtable.AddTitle(lineArray[0]);
            //datas
            for (int i = 1; i < lineArray.Length; ++i)
            {
                newtable.AddRow(lineArray[i]);
            }

            _tables.Add(text.name, newtable);
        }
    }