From 556b65e487a13c62536f6931c288b969c0ee028f Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 16 八月 2018 20:13:09 +0800
Subject: [PATCH] 更新lua 基础脚本框架

---
 Assets/XLua/Gen/UnityEngineComponentWrap.cs |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/Assets/XLua/Gen/UnityEngineComponentWrap.cs b/Assets/XLua/Gen/UnityEngineComponentWrap.cs
index 5a4e051..2868094 100644
--- a/Assets/XLua/Gen/UnityEngineComponentWrap.cs
+++ b/Assets/XLua/Gen/UnityEngineComponentWrap.cs
@@ -21,7 +21,7 @@
         {
 			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
 			System.Type type = typeof(UnityEngine.Component);
-			Utils.BeginObjectRegister(type, L, translator, 0, 10, 3, 1);
+			Utils.BeginObjectRegister(type, L, translator, 0, 11, 3, 1);
 			
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetComponent", _m_GetComponent);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetComponentInChildren", _m_GetComponentInChildren);
@@ -33,6 +33,7 @@
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendMessageUpwards", _m_SendMessageUpwards);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "SendMessage", _m_SendMessage);
 			Utils.RegisterFunc(L, Utils.METHOD_IDX, "BroadcastMessage", _m_BroadcastMessage);
+			Utils.RegisterFunc(L, Utils.METHOD_IDX, "FindChildComponent", _m_FindChildComponent);
 			
 			
 			Utils.RegisterFunc(L, Utils.GETTER_IDX, "transform", _g_get_transform);
@@ -564,6 +565,36 @@
             
         }
         
+        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
+        static int _m_FindChildComponent(RealStatePtr L)
+        {
+		    try {
+            
+                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
+            
+            
+                UnityEngine.Component gen_to_be_invoked = (UnityEngine.Component)translator.FastGetCSObj(L, 1);
+            
+            
+                
+                {
+                    string __type = LuaAPI.lua_tostring(L, 2);
+                    string __path = LuaAPI.lua_tostring(L, 3);
+                    
+                        UnityEngine.Component gen_ret = gen_to_be_invoked.FindChildComponent( __type, __path );
+                        translator.Push(L, gen_ret);
+                    
+                    
+                    
+                    return 1;
+                }
+                
+            } catch(System.Exception gen_e) {
+                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
+            }
+            
+        }
+        
         
         
         

--
Gitblit v1.8.0