Пример #1
0
    void LoadCsvAsset<T>(ref T t, string CsvFileName)
    {
        TextAsset ta = (TextAsset)Resources.Load("Config/CsvConfigs/" + CsvFileName);
        if (ta == null)
            NGUIDebug.Log("加载Csv配置文件失败 4: " + CsvFileName);

        CSVObjMapperExt mapper = new CSVObjMapperExt();
        t = mapper.GetClassFromCSVstring<T>(ta.text);
    }
Пример #2
0
    void LoadCsvAsset<T>(ref Dictionary<uint, T> dic, string CsvFileName)
    {
        TextAsset ta = (TextAsset)Resources.Load("Config/CsvConfigs/" + CsvFileName);
        if (ta == null)
            NGUIDebug.Log("加载Csv配置文件失败 2: " + CsvFileName);

        CSVObjMapperExt mapper = new CSVObjMapperExt();
        dic = mapper.GetUintDictFromCSVString<T>(ta.text);
    }