Exemplo n.º 1
0
    public static int FindObjectsOfType(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 1 && LuaAPI.IsNumber(L, 1))
        {
            System.Type          arg0 = (System.Type)LuaCallback.ToType(L, 1);
            UnityEngine.Object[] res  = UnityEngine.Object.FindObjectsOfType(arg0);
            LuaCallback.PushArray(L, res);
            return(1);
        }
        return(0);
    }
Exemplo n.º 2
0
    public static int GetComponentsInChildren(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2) && LuaAPI.IsBool(L, 3))
        {
            UnityEngine.Component   arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.Type             arg1 = (System.Type)LuaCallback.ToType(L, 2);
            System.Boolean          arg2 = (System.Boolean)LuaCallback.ToBool(L, 3);
            UnityEngine.Component[] res  = arg0.GetComponentsInChildren(arg1, arg2);
            LuaCallback.PushArray(L, res);
            return(1);
        }
        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2))
        {
            UnityEngine.Component   arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.Type             arg1 = (System.Type)LuaCallback.ToType(L, 2);
            UnityEngine.Component[] res  = arg0.GetComponentsInChildren(arg1);
            LuaCallback.PushArray(L, res);
            return(1);
        }
        return(0);
    }
Exemplo n.º 3
0
    public static int GetComponents(System.IntPtr L)
    {
        int nargs = LuaAPI.GetTop(L);

        if (nargs == 2 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2))
        {
            UnityEngine.Component   arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.Type             arg1 = (System.Type)LuaCallback.ToType(L, 2);
            UnityEngine.Component[] res  = arg0.GetComponents(arg1);
            LuaCallback.PushArray(L, res);
            return(1);
        }
        if (nargs == 3 && LuaAPI.IsObject(L, 1) && LuaAPI.IsNumber(L, 2) && LuaAPI.IsObject(L, 3))
        {
            UnityEngine.Component arg0 = (UnityEngine.Component)LuaCallback.ToObject(L, 1);
            System.Type           arg1 = (System.Type)LuaCallback.ToType(L, 2);
            System.Collections.Generic.List <UnityEngine.Component> arg2 = (System.Collections.Generic.List <UnityEngine.Component>)LuaCallback.ToObject(L, 3);
            arg0.GetComponents(arg1, arg2);

            return(0);
        }
        return(0);
    }