From 1cabe469aeb05c933f20b557aacd804792b69c35 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 04 三月 2021 17:04:55 +0800
Subject: [PATCH] 0312 新增表导出IL表代码

---
 Assets/Editor/Tool/TableTool.cs |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Assets/Editor/Tool/TableTool.cs b/Assets/Editor/Tool/TableTool.cs
index 61d8a3b..319e074 100644
--- a/Assets/Editor/Tool/TableTool.cs
+++ b/Assets/Editor/Tool/TableTool.cs
@@ -11,11 +11,13 @@
 public class TableTool : EditorWindow
 {
 
-    public static string configOutPutPath = UnityEngine.Application.dataPath + "/StreamingAssets/Config";
+    public static string configOutPutPath;
+    static bool isIL = false; // 瀵煎嚭琛ㄤ唬鐮佹槸鍚L浣跨敤
 
     [UnityEditor.MenuItem("绛栧垝宸ュ叿/瀵煎嚭绛栧垝琛ㄥ埌娓告垙宸ョ▼")]
     static void Init()
     {
+        configOutPutPath = UnityEngine.Application.dataPath + "/StreamingAssets/Config";
         window = GetWindow(typeof(TableTool), true, "绛栧垝瀵艰〃宸ュ叿") as TableTool;
         window.position = new Rect(UnityEngine.Screen.width / 2, UnityEngine.Screen.height / 2, 300, 700);
         window.Show();
@@ -65,6 +67,7 @@
         GUILayout.BeginHorizontal();
         if (GUILayout.Button("瀵煎嚭琛�"))
         {
+            isIL = false;
             ReadAllTxt();
             GenAllClass();
             MessageBox.Show("瀵煎嚭琛ㄦ垚鍔燂紒");
@@ -72,7 +75,18 @@
         }
         GUILayout.EndHorizontal();
 
-        GUILayout.EndVertical();
+        GUILayout.BeginHorizontal();
+        if (GUILayout.Button("瀵煎嚭IL琛�"))
+        {
+            isIL = true;
+            ReadAllTxt();
+            GenAllClass();
+            MessageBox.Show("瀵煎嚭IL琛ㄦ垚鍔燂紒");
+            AssetDatabase.Refresh();
+            isIL = false;
+        }
+        GUILayout.EndHorizontal();
+
 
         if (GUILayout.Button("閫夋嫨璺緞"))
         {
@@ -89,6 +103,7 @@
 #endif
 
         }
+        GUIUtility.ExitGUI();
     }
 
     private void ShowTableNames()
@@ -262,7 +277,7 @@
             }
             FileStream fileStream = _tableNameLst[i].fileInfo.OpenRead();
             StreamReader sr = new StreamReader(fileStream, Encoding.Default);
-            CreateConfigClassFile.CreateConfigClass(_tableNameLst[i].fileInfo);
+            CreateConfigClassFile.CreateConfigClass(_tableNameLst[i].fileInfo, isIL);
             sr.Dispose();
             sr.Close();
         }

--
Gitblit v1.8.0