|   | 
| using System.IO; | 
| using Snxxz.UI; | 
| using UnityEditor; | 
| using UnityEngine; | 
|   | 
| public class ExportGuides | 
| { | 
|   | 
|     [MenuItem("Tools/导出引导提示")] | 
|     public static void ExportTipContent() | 
|     { | 
|         Debug.Log("开始导出"); | 
|         var path = StringUtility.Contact("Assets/", "GuidesTips.txt"); | 
|         if (File.Exists(path)) | 
|             File.Delete(path); | 
|         var writer = File.CreateText(path); | 
|         var guides = GuideConfig.GetValues(); | 
|         foreach (var config in guides) | 
|         { | 
|             var prefix = ""; | 
|             if (config.Type == 1) | 
|                 prefix = NewBieGuideScriptableObject.GuidesPrefixNewBie; | 
|             else if (config.Type == 2) | 
|                 prefix = NewBieGuideScriptableObject.GuidesPrefixFun; | 
|             else | 
|                 continue; | 
|             foreach (var setpId in config.Steps) | 
|             { | 
|                 NewBieGuideScriptableObject so = null; | 
|                 if (config.Type == 1) | 
|                     so = ScriptableObjectLoader.LoadSoNewBieGuideStep(setpId); | 
|                 else | 
|                     so = ScriptableObjectLoader.LoadSoFunctionalGuideStep(setpId); | 
|                 if (so == null || string.IsNullOrEmpty(so.tipContent)) | 
|                     continue; | 
|                 writer.WriteLine(string.Format("{0}{1} \t{2}", prefix, setpId, so.tipContent)); | 
|             } | 
|         } | 
|         writer.Close(); | 
|         Debug.Log("导出成功"); | 
|     } | 
|   | 
| } |