xLua
xLua copied to clipboard
xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
1、通过这种方式 xlua.hotfix(CS.GameUI.MLobbyTaskDailyPanel,"OnShow",OnShow) 热更的热更对象私有属性、base都可以使用,不需要添加 xlua.private_accessible 2、通过这种方式 xlua.hotfix(“GameUI.MLobbyTaskDailyPanel”,"OnShow",OnShow) 必须添加 xlua.private_accessible 才能使用base以及访问私有属性字段。 3、xlua.hotfix("GameUI.MLobbyRelationShipPanel+GiftListItemBusiness","OnRefresh",OnRefresh) 一个内联类又能直接访问base和私有字段,那如果“GiftListItemBusiness”定义为非“public”的其私有域又是什么样子的? 是否是有啥约定规则在里面,FAQ跟Issuse搜了一下没有相关的说明,麻烦了。
 只写了这一句代码。 下图是关闭UI以后LuaProfile显示的引用计数 
这个类发布前没有OnDestroy方法
Unity 2020.1.7f1c1 InvalidCastException: This type must add to CSharpCallLua: XLuaTest.InvokeLua+CalcNew XLua.LuaTable.GetInPath[T] (System.String path) (at Assets/XLua/Src/LuaTable.cs:160) XLuaTest.InvokeLua.Test (XLua.LuaEnv luaenv) (at Assets/XLua/Examples/04_LuaObjectOrented/InvokeLua.cs:99) XLuaTest.InvokeLua.Start () (at Assets/XLua/Examples/04_LuaObjectOrented/InvokeLua.cs:92)
Windows 32位包运行后闪退,64位包正常,看log是在luaopen_protobuf_c后出现,即加载protobuf_c时发生。具体log如下: LUA: Device model Begin :B250M-D3H (Gigabyte Technology Co., Ltd.) (Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) LUA: Device model After : (Gigabyte Technology Co., Ltd.) (Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) LUA: SystemInfo...
关于 xLua 注入成功后,又触发了编译,覆盖了注入结果引发该 Bug 的解决方案 在 Editor 文件夹内,创建如下脚本: --- using UnityEditor.Build; using UnityEditor.Build.Reporting; using XLua; class XLuaBuildProcessor : IPostBuildPlayerScriptDLLs { public int callbackOrder { get { return 0; } }...
Hi, I use xlua-2.1.16 build with luajit for win64, I got a problem with calling delegate from lua, I try to call a delegate with int parameter then it throws...
2021-06-08 19:22:10,763[ Error] [06/08 19:22:10.762]xLua exception : c# exception:System.NullReferenceException: Object reference not set to an instance of an object. at XLua.ObjectTranslator.getDelegate (XLua.DelegateBridgeBase bridge, System.Type delegateType) [0x00000] in :0 at XLua.ObjectTranslator.CreateDelegateBridge...
linux环境使用sh make_linux64_lua53.sh编译出libxlua.so后通过web访问报错: at (wrapper managed-to-native) XLua.LuaDLL.Lua:xlua_get_lib_version () at XLua.LuaEnv..ctor () [0x00000] in :0 at BattleWebServer.BattleWeb.Setup () [0x00000] in :0 at BattleWebServer.BattleWeb.Init () [0x00000] in :0 at ASP.default_aspx.__RenderTree (System.Web.UI.HtmlTextWriter __output, System.Web.UI.Control...