#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_StyleSheetWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(TMPro.TMP_StyleSheet); Utils.BeginObjectRegister(type, L, translator, 0, 2, 0, 0); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetStyle", _m_GetStyle); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshStyles", _m_RefreshStyles); 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) == 1) { var gen_ret = new TMPro.TMP_StyleSheet(); 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_StyleSheet constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetStyle(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_StyleSheet gen_to_be_invoked = (TMPro.TMP_StyleSheet)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int _hashCode = LuaAPI.xlua_tointeger(L, 2); var gen_ret = gen_to_be_invoked.GetStyle( _hashCode ); translator.Push(L, gen_ret); return 1; } if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _name = LuaAPI.lua_tostring(L, 2); var gen_ret = gen_to_be_invoked.GetStyle( _name ); 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_StyleSheet.GetStyle!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RefreshStyles(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_StyleSheet gen_to_be_invoked = (TMPro.TMP_StyleSheet)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.RefreshStyles( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } } }