Exemple #1
0
    static int GetLuaComponentsInParen(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
                LuaComponent[]         o    = ComponentUtil.GetLuaComponentsInParen(arg0);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 2)
            {
                UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 1, typeof(UnityEngine.GameObject));
                string arg1 = ToLua.CheckString(L, 2);
                System.Collections.Generic.List <LuaComponent> o = ComponentUtil.GetLuaComponentsInParen(arg0, arg1);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: ComponentUtil.GetLuaComponentsInParen"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }