xLua icon indicating copy to clipboard operation
xLua copied to clipboard

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.

Results 221 xLua issues
Sort by recently updated
recently updated
newest added

![image](https://github.com/Tencent/xLua/assets/87222759/eee22894-9ec1-4a10-baeb-7b3a0ab35e12) 报错的Lua脚本方法 ![image](https://github.com/Tencent/xLua/assets/87222759/90b1f32c-12f5-4d8e-b5e9-81c1ce66716a) _self是脚本的this 只要访问position和rotation都会包这种错

看到目前代码仓里的最新版本lua是5.4.1,其中包含一个未修复的CVE:[CVE-2022-28805](https://nvd.nist.gov/vuln/detail/CVE-2022-28805),可以通过打上对应的[patch](https://github.com/lua/lua/commit/1f3c6f4534c6411313361697d98d1145a1f030fa)来修复

卡在这个地方很久 ![image](https://github.com/Tencent/xLua/assets/31341515/b7a9049d-f240-4d37-b4d3-64aeff19d6f1) 1000秒左右会报错打包失败 ![image](https://github.com/Tencent/xLua/assets/31341515/5c3bcc16-c39a-4836-bb1e-1fd1be91f6be) 1. Building Library/Bee/artifacts/Android/fy9m9/libil2cpp.so failed with output: /Applications/Unity/Hub/Editor/2022.1.24f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: internal error in arm_branch_common, at /Volumes/Android/buildbot/src/android/binutils/toolchain/binutils/binutils-2.27/gold/arm.cc:4063 clang++: error: linker command failed with exit code 1 (use -v to see...

操作 1、集成第三方库rapidjson `[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static extern int luaopen_rapidjson(System.IntPtr L); [MonoPInvokeCallback(typeof(LuaDLL.lua_CSFunction))] public static int LoadRapidJson(System.IntPtr L) { return luaopen_rapidjson(L); }` `AddBuildin("rapidjson", XLua.LuaDLL.Lua.LoadRapidJson);` 2、编译android版本的xlua 3、unity选择webgl平台编辑 出现如下错误 `Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js: undefined symbol:...

LuaDLL.cs 中PInvoke的返回值为int ``` [DllImport(LUADLL,CallingConvention=CallingConvention.Cdecl)] public static extern int lua_rawget(IntPtr L, int index); ``` Lua5.1及luajit的源码中,该函数签名返回值为void(其他高版本是int) build/lua-5.1.5/src/lapi.c build/luajit-2.1.0b2/src/lj_api.c build/luajit-2.1.0b3/src/lj_api.c 很容易踩坑,是否考虑弄个xlua_rawget包装一层来屏蔽掉不一致的问题?

unity 2022.3.11f I'm using a slightly modified lua code (02_U3DScripting) as an example. ```lua local speed = 10 local lightCpnt = nil local rb function start() print("lua start...") print("injected object",...

由于lua是弱语言。有些时候写的不规范,可能会排查很久原因。 例如:当使用` if go.activeInHierarchy then`,而`activeInHierarchy` 不小心写错,那么这个在if条件会始终判定为false,而程序逻辑不会有强异常报错 我希望在可以自定义做一些调整,比如重写`__index`,从而抛出异常,但是CodeEmit和Wrap文件,不是那么容易看懂。 如果有类似的FAQ方案,可以参考一下

复现代码: lua: self={} self.ShoppingMallPage = self.ShoppingMallPageGameObject:GetComponent("ShoppingMallPageComponent") self.ShoppingMallPage = nil self.ShoppingMallPageGameObject = nil self=nil collectgarbage() objectpool.cs里还会残留ShoppingMallPageComponent的Type引用

xlua Generate Code后报错,unity2022环境,请问是什么原因,怎么解决,困扰很久了,不少人都反馈这个问题