Пример #1
0
    public static int FindObjectOfType(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.FindObjectOfType(arg0);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }
Пример #2
0
    public static int GetComponentInParent(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.GetComponentInParent(arg1);
            LuaCallback.PushObject(L, res);
            return(1);
        }
        return(0);
    }
Пример #3
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);
    }
Пример #4
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);
    }