public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("更新孩子节点")) { list = new List <Children>(); ChildrenHelper childrenHelper = (ChildrenHelper)target; GetChildren(childrenHelper.gameObject); childrenHelper.list = list; } }
static int GetHieChild(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); ChildrenHelper obj = (ChildrenHelper)ToLua.CheckObject(L, 1, typeof(ChildrenHelper)); string arg0 = ToLua.CheckString(L, 2); UnityEngine.GameObject o = obj.GetHieChild(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int get_dic(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ChildrenHelper obj = (ChildrenHelper)o; System.Collections.Generic.Dictionary <string, UnityEngine.GameObject> ret = obj.dic; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index dic on a nil value" : e.Message)); } }
static int get_list(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ChildrenHelper obj = (ChildrenHelper)o; System.Collections.Generic.List <Children> ret = obj.list; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index list on a nil value" : e.Message)); } }
static int set_dic(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ChildrenHelper obj = (ChildrenHelper)o; System.Collections.Generic.Dictionary <string, UnityEngine.GameObject> arg0 = (System.Collections.Generic.Dictionary <string, UnityEngine.GameObject>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.Dictionary <string, UnityEngine.GameObject>)); obj.dic = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index dic on a nil value" : e.Message)); } }
static int set_list(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); ChildrenHelper obj = (ChildrenHelper)o; System.Collections.Generic.List <Children> arg0 = (System.Collections.Generic.List <Children>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <Children>)); obj.list = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index list on a nil value" : e.Message)); } }