#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_ResourceManagerWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(TMPro.TMP_ResourceManager); Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 3, 0, 0); Utils.RegisterFunc(L, Utils.CLS_IDX, "AddFontAsset", _m_AddFontAsset_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "TryGetFontAsset", _m_TryGetFontAsset_xlua_st_); 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) == 1) { var gen_ret = new TMPro.TMP_ResourceManager(); translator.Push(L, gen_ret); 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_ResourceManager constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_AddFontAsset_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { TMPro.TMP_FontAsset _fontAsset = (TMPro.TMP_FontAsset)translator.GetObject(L, 1, typeof(TMPro.TMP_FontAsset)); TMPro.TMP_ResourceManager.AddFontAsset( _fontAsset ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_TryGetFontAsset_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { int _hashcode = LuaAPI.xlua_tointeger(L, 1); TMPro.TMP_FontAsset _fontAsset; var gen_ret = TMPro.TMP_ResourceManager.TryGetFontAsset( _hashcode, out _fontAsset ); LuaAPI.lua_pushboolean(L, gen_ret); translator.Push(L, _fontAsset); return 2; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } } }