예제 #1
0
    static bool Mesh_SetIndices__Int32_Array__MeshTopology__Int32(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 3)
        {
            System.Int32[] arg0 = JSDataExchangeMgr.GetJSArg <System.Int32[]>(() =>
            {
                int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg);
                int length  = JSApi.getArrayLength(jsObjID);
                var ret     = new System.Int32[length];
                for (var i = 0; i < length; i++)
                {
                    JSApi.getElement(jsObjID, i);
                    ret[i] = (System.Int32)JSApi.getInt32((int)JSApi.GetType.SaveAndRemove);
                }
                return(ret);
            });
            UnityEngine.MeshTopology arg1 = (UnityEngine.MeshTopology)JSApi.getEnum((int)JSApi.GetType.Arg);
            System.Int32             arg2 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg);
            ((UnityEngine.Mesh)vc.csObj).SetIndices(arg0, arg1, arg2);
        }

        return(true);
    }
예제 #2
0
    static bool Graphics_DrawProceduralIndirect__MeshTopology__ComputeBuffer(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 2)
        {
            UnityEngine.MeshTopology  arg0 = (UnityEngine.MeshTopology)JSApi.getEnum((int)JSApi.GetType.Arg);
            UnityEngine.ComputeBuffer arg1 = (UnityEngine.ComputeBuffer)JSMgr.datax.getObject((int)JSApi.GetType.Arg);
            UnityEngine.Graphics.DrawProceduralIndirect(arg0, arg1);
        }

        return(true);
    }
예제 #3
0
    static bool Graphics_DrawProcedural__MeshTopology__Int32(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 2)
        {
            UnityEngine.MeshTopology arg0 = (UnityEngine.MeshTopology)JSApi.getEnum((int)JSApi.GetType.Arg);
            System.Int32             arg1 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg);
            UnityEngine.Graphics.DrawProcedural(arg0, arg1);
        }

        return(true);
    }
예제 #4
0
 static public int GetTopology(IntPtr l)
 {
     try{
         UnityEngine.Mesh self = (UnityEngine.Mesh)checkSelf(l);
         System.Int32     a1;
         checkType(l, 2, out a1);
         UnityEngine.MeshTopology ret = self.GetTopology(a1);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }