static int _m_GetComponentsInChildren(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.GameObject gen_to_be_invoked = (UnityEngine.GameObject)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && translator.Assignable <System.Type>(L, 2)) { System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type)); var gen_ret = gen_to_be_invoked.GetComponentsInChildren(_type); translator.Push(L, gen_ret); return(1); } if (gen_param_count == 3 && translator.Assignable <System.Type>(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) { System.Type _type = (System.Type)translator.GetObject(L, 2, typeof(System.Type)); bool _includeInactive = LuaAPI.lua_toboolean(L, 3); var gen_ret = gen_to_be_invoked.GetComponentsInChildren(_type, _includeInactive); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.GameObject.GetComponentsInChildren!")); }
static StackObject *GetComponentsInChildren_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.GetComponentsInChildren <BehaviorDesigner.Runtime.BehaviorTree>(); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
public static int GetComponentsInChildren(IntPtr L) { int result = 1; int count = LuaDLL.lua_gettop(L); if (count == 2 && LuaStatic.CheckType(L, typeof(Type), 2)) { UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject; object type1 = LuaStatic.GetObj(L, 2); Type arg1 = LuaStatic.GetType(type1); IEnumerable objs = (IEnumerable)obj.GetComponentsInChildren(arg1); LuaDLL.lua_newtable(L); int num2 = 0; foreach (var item in objs) { LuaStatic.addGameObject2Lua(L, (UnityEngine.Component)item, (string)type1); LuaDLL.lua_pushnumber(L, (double)(++num2)); LuaDLL.lua_insert(L, -2); LuaDLL.lua_settable(L, -3); } return(result); } if (count == 3 && LuaStatic.CheckType(L, typeof(Type), 2) && LuaStatic.CheckType(L, typeof(Boolean), 3)) { UnityEngine.GameObject obj = LuaStatic.GetObj(L, 1) as UnityEngine.GameObject; object type1 = LuaStatic.GetObj(L, 2); Type arg1 = LuaStatic.GetType(type1); Boolean arg2 = (Boolean)LuaStatic.GetObj(L, 3); IEnumerable objs = (IEnumerable)obj.GetComponentsInChildren(arg1, arg2); LuaDLL.lua_newtable(L); int num2 = 0; foreach (var item in objs) { LuaStatic.addGameObject2Lua(L, (UnityEngine.Component)item, "Component"); LuaDLL.lua_pushnumber(L, (double)(++num2)); LuaDLL.lua_insert(L, -2); LuaDLL.lua_settable(L, -3); } return(result); } LuaStatic.traceback(L, "count not enough"); LuaDLL.lua_error(L); return(result); }
static StackObject *GetComponentsInChildren_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @includeInactive = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.GameObject instance_of_this_method = (UnityEngine.GameObject) typeof(UnityEngine.GameObject).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.GetComponentsInChildren <UnityEngine.UI.ViewModelDataSourceList>(@includeInactive); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }