Beispiel #1
0
    public void WriteCamera9Conf(object _data)
    {
        var json = JsonUtility.ToJson(_data);

        Debug.Log(json);
        IOTool.CreateFileString(Application.dataPath + cPath, json);
    }
Beispiel #2
0
 /// <summary>
 /// 下载更新文件
 /// </summary>
 static void DoUpdateFile()
 {
     if (_NowLoadIndex < _UpdateFilePaths.Count)
     {
         Debug.Log("文件下载地址 " + _UpdateFilePaths.Count + "       " + mDownloadPath + _UpdateFilePaths[_NowLoadIndex]);
         var _request = new HTTPRequest(new Uri(mDownloadPath + _UpdateFilePaths[_NowLoadIndex]), OnUpdateOver);
         _request.Send();
     }
     else
     {
         //所有文件更新完毕
         Debug.Log("所有文件更新完毕 " + mVersionPath);
         //保存版本文件
         IOTool.CreateFileString(mVersionPath, mVersion);
         if (mUpdateFinishCb != null)
         {
             mUpdateFinishCb();
         }
     }
 }
Beispiel #3
0
 /// <summary>
 /// 开始导出对应文件
 /// </summary>
 void DoOutputFile(ExcelOutputData data)
 {
     if (data.IsNeedCS)
     {
         if (string.IsNullOrEmpty(CSharpOutputPath))
         {
             EditorUtility.DisplayDialog("提示", "当前C#脚本导出路径不存在", "确定");
             return;
         }
         else
         {
             if (!Directory.Exists(CSharpOutputPath))
             {
                 Directory.CreateDirectory(CSharpOutputPath);
             }
             string _code = GetCSCode();
             IOTool.CreateFileString(CSharpOutputPath + "/" + _TableName + ".cs", _code);
         }
     }
     if (data.IsNeedLua)
     {
         if (string.IsNullOrEmpty(LuaOutputPath))
         {
             EditorUtility.DisplayDialog("提示", "当前Lua脚本导出路径不存在", "确定");
             return;
         }
         else
         {
             if (!Directory.Exists(LuaOutputPath))
             {
                 Directory.CreateDirectory(LuaOutputPath);
             }
             string _code = GetLuaCode();
             IOTool.CreateFileString(LuaOutputPath + "/" + _TableName + ".lua", _code);
         }
     }
     ClearData();    //一组数据导出后,清除临时数据
 }