示例#1
0
        void RenderMeshInstanced(int instanceCount)
        {
            materialPropertyBlock.Clear();
            materialPropertyBlock.SetFloatArray(ColumnID, columnIndx);
            materialPropertyBlock.SetFloatArray(RowID, rowIndx);

            cmd.DrawMeshInstanced(instanceMesh, 0, material, -1, TRSs, instanceCount, materialPropertyBlock);
        }
示例#2
0
        static int _m_SetFloatArray(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.MaterialPropertyBlock __cl_gen_to_be_invoked = (UnityEngine.MaterialPropertyBlock)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <System.Collections.Generic.List <float> >(L, 3))
                {
                    int nameID = LuaAPI.xlua_tointeger(L, 2);
                    System.Collections.Generic.List <float> values = (System.Collections.Generic.List <float>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List <float>));

                    __cl_gen_to_be_invoked.SetFloatArray(nameID, values);



                    return(0);
                }
                if (__gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && translator.Assignable <float[]>(L, 3))
                {
                    int     nameID = LuaAPI.xlua_tointeger(L, 2);
                    float[] values = (float[])translator.GetObject(L, 3, typeof(float[]));

                    __cl_gen_to_be_invoked.SetFloatArray(nameID, values);



                    return(0);
                }
                if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <System.Collections.Generic.List <float> >(L, 3))
                {
                    string name = LuaAPI.lua_tostring(L, 2);
                    System.Collections.Generic.List <float> values = (System.Collections.Generic.List <float>)translator.GetObject(L, 3, typeof(System.Collections.Generic.List <float>));

                    __cl_gen_to_be_invoked.SetFloatArray(name, values);



                    return(0);
                }
                if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <float[]>(L, 3))
                {
                    string  name   = LuaAPI.lua_tostring(L, 2);
                    float[] values = (float[])translator.GetObject(L, 3, typeof(float[]));

                    __cl_gen_to_be_invoked.SetFloatArray(name, values);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.MaterialPropertyBlock.SetFloatArray!"));
        }