| using System.Collections; | 
| using System.Collections.Generic; | 
| using UnityEngine; | 
| using UnityEditor; | 
| using System.IO;  | 
| using System.Text;  | 
|   | 
| public static class PrintTaskClueNamesTool  | 
| { | 
|     static string folderPath = string.Empty; | 
|   | 
|     [MenuItem("策划工具/法宝任务名称")] | 
|     static void Start()  | 
|     {  | 
|         TaskListConfig.Init(true);  | 
|         TASKINFOConfig.Init(true);  | 
|   | 
|         folderPath = EditorUtility.OpenFolderPanel("选择文件夹", folderPath, string.Empty);  | 
|   | 
|         if (string.IsNullOrEmpty(folderPath))  | 
|         {  | 
|             Debug.LogError("未选择正确的文件夹");  | 
|             return;  | 
|         }  | 
|   | 
|         var filePath = folderPath + "/" + "taskNames.txt";  | 
|   | 
|         using (var fs = new FileStream(filePath, FileMode.Create, FileAccess.Write))  | 
|         {  | 
|             using (var sw = new StreamWriter(fs, Encoding.UTF8))  | 
|             {  | 
|                 var configs = TaskListConfig.GetValues();  | 
|                 foreach (var config in configs)  | 
|                 {  | 
|                     if (config.FabaoID != 0 && config.clue != 0)  | 
|                     {  | 
|                         var taskInfoConfig = TASKINFOConfig.Get(config.TaskName);  | 
|                         if (taskInfoConfig != null)  | 
|                         {  | 
|                             sw.WriteLine("TaskList       " + config.TaskID + "       " + "TASKINFO:" + config.TaskName + "       " + taskInfoConfig.show_writing);  | 
|                         }  | 
|                         else  | 
|                         {  | 
|                             sw.WriteLine("TaskList       " + config.TaskID + "       " + "TASKINFO       " + "没有key:" + config.TaskName);  | 
|                         }  | 
|                     }  | 
|                 }  | 
|             }  | 
|         }  | 
|     } | 
| } |