xLua
xLua copied to clipboard
xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.
如何在 Lua 中获取给定 Dictionary 值的所有键? 我唯一能让它工作的方式是创建一个像这样的辅助方法: ```csharp public static class LuaUtil { public static List ConvertEnumerableToList(IEnumerable values) { var result = new List(); foreach (var item in values) { result.Add(item);...
在lua-protobuf解析时,大部分消息是没问题的,少量消息,尤其是带有中文时,经常出现问题 会报错:un-finished bytes (len 42 at offset 21),有些人遇到解决了,但是方案都不是很明确 哪位大佬能给个解决方案吗? 就算用base64处理后在lua中解出来,但是只要在lua里面传值,还是会转成string,并没有解决问题 有哪位大佬解决过这个问题~
RT. Mac, Unity 2021.3.33f1 + xlua-v2.1.16_ndkr21b_with_win + Lua 5.4.1 版本,不是必现,但是概率非常大。 Obtained 41 stack frames. #0 0x007ff801c866b2 in _platform_strlen #1 0x00000160126921 in mono_string_new_checked #2 0x0000016014a824 in mono_string_new_handle #3 0x000001600e977d in ves_icall_string_new_wrapper...
 
`public class TestClass { public string this[int x,int y] { get { return x + "," + y; } set ; } }` 请问能够在Lua中直接使用吗?如果可以应该怎样做? 如果一个索引值是没问题,但是多个索引值貌似就不行了。
Hi, thank you for maintain this repo ! I would like to use this library on visionOS. However, the plugin binary for visionOS is not there currently. Could you make...
local errorVec = {} print(Vector3.one - errorVec) 以上代码可以运行,没有报错,输出的是(1.0, 1.0, 1.0) 不能检查Vector3的合法性吗
public delegate void LuaFunction_(); [GCOptimize] public struct LuaBootstrap { public LuaFunction_ Start; public LuaFunction_ Update; public LuaFunction_ OnDestroy; } public class Bootstrap : MonoBehaviour { private LuaBootstrap bootstrap; void Start()...
[xLua](https://github.com/Tencent/xLua/tree/master)/[Assets](https://github.com/Tencent/xLua/tree/master/Assets)/[XLua](https://github.com/Tencent/xLua/tree/master/Assets/XLua)/[Src](https://github.com/Tencent/xLua/tree/master/Assets/XLua/Src) /CodeEmit.cs ``` static bool isMethodInBlackList(MethodBase mb) { if (mb.GetParameters().Any(pInfo => pInfo.ParameterType.IsPointer)) return true; if (mb is MethodInfo && (mb as MethodInfo).ReturnType.IsPointer) return false; // ???? if (mb.IsDefined(typeof(BlackListAttribute), false) ||...
``` var setter = prop.GetSetMethod(); if (setter != null && setter.IsPublic) { if (prop.GetIndexParameters().Length > 0) { if (!prop.GetIndexParameters()[0].ParameterType.IsAssignableFrom(typeof(string))) { itemSetter.Add(setter); } } else { emitRegisterFunc(il, emitPropertyWrap(wrapTypeBuilder, prop, setter, false),...