SetVectorArray() public method

public SetVectorArray ( int nameID, List values ) : void
nameID int
values List
return void
Example #1
0
 static public int SetVectorArray(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(int), typeof(UnityEngine.Vector4[])))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.Int32         a1;
             checkType(l, 2, out a1);
             UnityEngine.Vector4[] a2;
             checkArray(l, 3, out a2);
             self.SetVectorArray(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string), typeof(UnityEngine.Vector4[])))
         {
             UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
             System.String        a1;
             checkType(l, 2, out a1);
             UnityEngine.Vector4[] a2;
             checkArray(l, 3, out a2);
             self.SetVectorArray(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #2
0
    static int SetVectorArray(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes <int, UnityEngine.Vector4[]>(L, 2))
            {
                UnityEngine.Material obj = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                UnityEngine.Vector4[] arg1 = ToLua.ToStructArray <UnityEngine.Vector4>(L, 3);
                obj.SetVectorArray(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <string, UnityEngine.Vector4[]>(L, 2))
            {
                UnityEngine.Material obj = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                UnityEngine.Vector4[] arg1 = ToLua.ToStructArray <UnityEngine.Vector4>(L, 3);
                obj.SetVectorArray(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Material.SetVectorArray"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }