コード例 #1
0
    public void ImportFromCSV()
    {
        string filePath = "GameCSVData/";
        string fileName = "testingImport";
        List <Dictionary <string, string> > data = CSVImporter.LoadStringDataFromCSV(fileName, filePath);
        string loadedData = "";
        string keys       = "";

        foreach (string key in data[0].Keys)
        {
            keys += key + " | ";
        }
        loadedData += keys + "\n";
        Debug.Log(keys);

        foreach (Dictionary <string, string> dictionaryRow in data)
        {
            string loadedText = dictionaryRow["id"] + " | " + dictionaryRow["enum"] + " | " + dictionaryRow["name"];
            loadedData += loadedText + "\n";
            Debug.Log(loadedText + "\n");
        }
        TextDisplay.text = loadedData;
    }