#if USE_UNI_LUA using LuaAPI = UniLua.Lua; using RealStatePtr = UniLua.ILuaState; using LuaCSFunction = UniLua.CSharpFunctionDelegate; #else using LuaAPI = XLua.LuaDLL.Lua; using RealStatePtr = System.IntPtr; using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; #endif using XLua; using System.Collections.Generic; namespace XLua.CSObjectWrap { using Utils = XLua.Utils; public class TMProTMP_MeshInfoWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(TMPro.TMP_MeshInfo); Utils.BeginObjectRegister(type, L, translator, 0, 5, 10, 10); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ResizeMeshInfo", _m_ResizeMeshInfo); Utils.RegisterFunc(L, Utils.METHOD_IDX, "Clear", _m_Clear); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearUnusedVertices", _m_ClearUnusedVertices); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SortGeometry", _m_SortGeometry); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SwapVertexData", _m_SwapVertexData); Utils.RegisterFunc(L, Utils.GETTER_IDX, "mesh", _g_get_mesh); Utils.RegisterFunc(L, Utils.GETTER_IDX, "vertexCount", _g_get_vertexCount); Utils.RegisterFunc(L, Utils.GETTER_IDX, "vertices", _g_get_vertices); Utils.RegisterFunc(L, Utils.GETTER_IDX, "normals", _g_get_normals); Utils.RegisterFunc(L, Utils.GETTER_IDX, "tangents", _g_get_tangents); Utils.RegisterFunc(L, Utils.GETTER_IDX, "uvs0", _g_get_uvs0); Utils.RegisterFunc(L, Utils.GETTER_IDX, "uvs2", _g_get_uvs2); Utils.RegisterFunc(L, Utils.GETTER_IDX, "colors32", _g_get_colors32); Utils.RegisterFunc(L, Utils.GETTER_IDX, "triangles", _g_get_triangles); Utils.RegisterFunc(L, Utils.GETTER_IDX, "material", _g_get_material); Utils.RegisterFunc(L, Utils.SETTER_IDX, "mesh", _s_set_mesh); Utils.RegisterFunc(L, Utils.SETTER_IDX, "vertexCount", _s_set_vertexCount); Utils.RegisterFunc(L, Utils.SETTER_IDX, "vertices", _s_set_vertices); Utils.RegisterFunc(L, Utils.SETTER_IDX, "normals", _s_set_normals); Utils.RegisterFunc(L, Utils.SETTER_IDX, "tangents", _s_set_tangents); Utils.RegisterFunc(L, Utils.SETTER_IDX, "uvs0", _s_set_uvs0); Utils.RegisterFunc(L, Utils.SETTER_IDX, "uvs2", _s_set_uvs2); Utils.RegisterFunc(L, Utils.SETTER_IDX, "colors32", _s_set_colors32); Utils.RegisterFunc(L, Utils.SETTER_IDX, "triangles", _s_set_triangles); Utils.RegisterFunc(L, Utils.SETTER_IDX, "material", _s_set_material); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if(LuaAPI.lua_gettop(L) == 3 && translator.Assignable(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { UnityEngine.Mesh _mesh = (UnityEngine.Mesh)translator.GetObject(L, 2, typeof(UnityEngine.Mesh)); int _size = LuaAPI.xlua_tointeger(L, 3); var gen_ret = new TMPro.TMP_MeshInfo(_mesh, _size); translator.Push(L, gen_ret); return 1; } if(LuaAPI.lua_gettop(L) == 4 && translator.Assignable(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 4)) { UnityEngine.Mesh _mesh = (UnityEngine.Mesh)translator.GetObject(L, 2, typeof(UnityEngine.Mesh)); int _size = LuaAPI.xlua_tointeger(L, 3); bool _isVolumetric = LuaAPI.lua_toboolean(L, 4); var gen_ret = new TMPro.TMP_MeshInfo(_mesh, _size, _isVolumetric); translator.Push(L, gen_ret); return 1; } if (LuaAPI.lua_gettop(L) == 1) { translator.Push(L, default(TMPro.TMP_MeshInfo)); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_MeshInfo constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ResizeMeshInfo(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _size = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.ResizeMeshInfo( _size ); translator.Update(L, 1, gen_to_be_invoked); return 0; } if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) { int _size = LuaAPI.xlua_tointeger(L, 2); bool _isVolumetric = LuaAPI.lua_toboolean(L, 3); gen_to_be_invoked.ResizeMeshInfo( _size, _isVolumetric ); translator.Update(L, 1, gen_to_be_invoked); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_MeshInfo.ResizeMeshInfo!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_Clear(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 1) { gen_to_be_invoked.Clear( ); translator.Update(L, 1, gen_to_be_invoked); return 0; } if(gen_param_count == 2&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2)) { bool _uploadChanges = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.Clear( _uploadChanges ); translator.Update(L, 1, gen_to_be_invoked); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_MeshInfo.Clear!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ClearUnusedVertices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 1) { gen_to_be_invoked.ClearUnusedVertices( ); translator.Update(L, 1, gen_to_be_invoked); return 0; } if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _startIndex = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.ClearUnusedVertices( _startIndex ); translator.Update(L, 1, gen_to_be_invoked); return 0; } if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3)) { int _startIndex = LuaAPI.xlua_tointeger(L, 2); bool _updateMesh = LuaAPI.lua_toboolean(L, 3); gen_to_be_invoked.ClearUnusedVertices( _startIndex, _updateMesh ); translator.Update(L, 1, gen_to_be_invoked); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_MeshInfo.ClearUnusedVertices!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SortGeometry(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 2&& translator.Assignable(L, 2)) { TMPro.VertexSortingOrder _order;translator.Get(L, 2, out _order); gen_to_be_invoked.SortGeometry( _order ); translator.Update(L, 1, gen_to_be_invoked); return 0; } if(gen_param_count == 2&& translator.Assignable>(L, 2)) { System.Collections.Generic.IList _sortingOrder = (System.Collections.Generic.IList)translator.GetObject(L, 2, typeof(System.Collections.Generic.IList)); gen_to_be_invoked.SortGeometry( _sortingOrder ); translator.Update(L, 1, gen_to_be_invoked); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_MeshInfo.SortGeometry!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SwapVertexData(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); { int _src = LuaAPI.xlua_tointeger(L, 2); int _dst = LuaAPI.xlua_tointeger(L, 3); gen_to_be_invoked.SwapVertexData( _src, _dst ); translator.Update(L, 1, gen_to_be_invoked); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_mesh(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.mesh); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_vertexCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.vertexCount); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_vertices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.vertices); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_normals(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.normals); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_tangents(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.tangents); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_uvs0(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.uvs0); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_uvs2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.uvs2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_colors32(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.colors32); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_triangles(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.triangles); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_material(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); translator.Push(L, gen_to_be_invoked.material); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_mesh(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.mesh = (UnityEngine.Mesh)translator.GetObject(L, 2, typeof(UnityEngine.Mesh)); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_vertexCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.vertexCount = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_vertices(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.vertices = (UnityEngine.Vector3[])translator.GetObject(L, 2, typeof(UnityEngine.Vector3[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_normals(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.normals = (UnityEngine.Vector3[])translator.GetObject(L, 2, typeof(UnityEngine.Vector3[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_tangents(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.tangents = (UnityEngine.Vector4[])translator.GetObject(L, 2, typeof(UnityEngine.Vector4[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_uvs0(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.uvs0 = (UnityEngine.Vector2[])translator.GetObject(L, 2, typeof(UnityEngine.Vector2[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_uvs2(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.uvs2 = (UnityEngine.Vector2[])translator.GetObject(L, 2, typeof(UnityEngine.Vector2[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_colors32(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.colors32 = (UnityEngine.Color32[])translator.GetObject(L, 2, typeof(UnityEngine.Color32[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_triangles(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.triangles = (int[])translator.GetObject(L, 2, typeof(int[])); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_material(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_MeshInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.material = (UnityEngine.Material)translator.GetObject(L, 2, typeof(UnityEngine.Material)); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }