From 041b77f011062b5bab5216cf1b9e650e8e3e188d Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 12 二月 2019 11:53:06 +0800
Subject: [PATCH] 3335 重构窗口管理

---
 Lua/LuaWindow.cs |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/Lua/LuaWindow.cs b/Lua/LuaWindow.cs
index 5751373..618e6d1 100644
--- a/Lua/LuaWindow.cs
+++ b/Lua/LuaWindow.cs
@@ -9,6 +9,9 @@
 [LuaCallCSharp]
 public class LuaWindow : Window
 {
+
+    public string filePath = "";
+
     Action luaOnDestroy;
 
     Action onBindController;
@@ -30,7 +33,7 @@
         table.SetMetaTable(meta);
         meta.Dispose();
 
-        LuaUtility.Do(string.Format("window.{0}", this.gameObject.name), this.gameObject.name, table);
+        LuaUtility.Do(filePath, this.gameObject.name, table);
 
         table.Get("BindController", out onBindController);
         table.Get("AddListeners", out onAddListeners);
@@ -137,21 +140,4 @@
         }
     }
 
-#if UNITY_EDITOR
-    [ContextMenu("LuaReload")]
-    public void ReLoadLua()
-    {
-        LuaUtility.Do(string.Format("window.{0}", this.gameObject.name), this.gameObject.name, table);
-
-        if (onBindController != null)
-        {
-            onBindController();
-        }
-
-        if (onAddListeners != null)
-        {
-            onAddListeners();
-        }
-    }
-#endif
 }

--
Gitblit v1.8.0