Beispiel #1
0
 /// <summary>
 /// 绘制输出按钮
 /// </summary>
 private void DrawOutputBtn()
 {
     if (GUILayout.Button("输出到控制台"))
     {
         string output = GetOutputStr(true);
         Debug.Log(output);
     }
     if (GUILayout.Button("输出到输出目录"))
     {
         string output = GetOutputStr(false);
         if (!Directory.Exists(SnapshotConfig.OutputFolder))
         {
             Directory.CreateDirectory(SnapshotConfig.OutputFolder);
         }
         //else
         //{
         var path = Path.Combine(SnapshotConfig.OutputFolder, GetOutputFileName(_outputTabOption == 1));
         SnapshotUtil.WriteToFile(path, output, $"输出监控数据成功:{path}");
         //}
     }
 }
Beispiel #2
0
 /// <summary>
 /// 获取格式化的快照时间
 /// </summary>
 /// <param name="index">快照索引</param>
 /// <returns></returns>
 private string GetFormatTime(int index)
 {
     return(SnapshotUtil.FormatTime(GetSnapshotInfo(index).time));
 }