static void CheckConfigFile()
    {
        if (!File.Exists(ConfFilePath))
        {
            CTabFile confFile = new CTabFile();
            confFile.NewRow();
            confFile.NewColumn("Key");
            confFile.NewColumn("Value");
            confFile.NewColumn("Comment");


            foreach (string[] strArr in DefaultConfigFileContent)
            {
                int row = confFile.NewRow();
                confFile.SetValue<string>(row, "Key", strArr[0]);
                confFile.SetValue<string>(row, "Value", strArr[1]);
                confFile.SetValue<string>(row, "Comment", strArr[2]);
            }
            confFile.Save(ConfFilePath);

            CBase.Log("新建CosmosEngine配置文件: {0}", ConfFilePath);
            AssetDatabase.Refresh();
        }

        ConfFile = CTabFile.LoadFromFile(ConfFilePath);
    }
    static void CheckConfigFile()
    {
        if (!File.Exists(ConfFilePath))
        {
            CTabFile confFile = new CTabFile();
            confFile.NewRow();
            confFile.NewColumn("Key");
            confFile.NewColumn("Value");
            confFile.NewColumn("Comment");


            foreach (string[] strArr in DefaultConfigFileContent)
            {
                int row = confFile.NewRow();
                confFile.SetValue <string>(row, "Key", strArr[0]);
                confFile.SetValue <string>(row, "Value", strArr[1]);
                confFile.SetValue <string>(row, "Comment", strArr[2]);
            }
            confFile.Save(ConfFilePath);

            CBase.Log("新建CosmosEngine配置文件: {0}", ConfFilePath);
            AssetDatabase.Refresh();
        }

        ConfFile = CTabFile.LoadFromFile(ConfFilePath);
    }
Пример #3
0
    public static bool IsCheckMd5 = false;  // 跟AssetServer关联~如果true,函数才有效

    public static void WriteVersion()
    {
        string   path    = GetBuildVersionTab();// MakeSureExportPath(VerCtrlInfo.VerFile, EditorUserBuildSettings.activeBuildTarget);
        CTabFile tabFile = new CTabFile();

        tabFile.NewColumn("AssetPath");
        tabFile.NewColumn("AssetMD5");
        tabFile.NewColumn("AssetDateTime");
        tabFile.NewColumn("ChangeCount");

        foreach (var node in BuildVersion)
        {
            int row = tabFile.NewRow();
            tabFile.SetValue(row, "AssetPath", node.Key);
            tabFile.SetValue(row, "AssetMD5", node.Value.MD5);
            tabFile.SetValue(row, "AssetDateTime", node.Value.DateTime);
            tabFile.SetValue(row, "ChangeCount", node.Value.ChangeCount);
        }

        tabFile.Save(path);
    }