UniLua icon indicating copy to clipboard operation
UniLua copied to clipboard

A pure c# implementation of Lua 5.2 focus on compatibility with Unity

Results 19 UniLua issues
Sort by recently updated
recently updated
newest added

比如用lua实现一个monobehaviour,在c#端每帧调用call("update"),这样的对象存在几百个,这样的模型是否可行?

I have been using UniLua happily a while ago, not pivking things up again, I run into an overflowexception It breaks in LuaTable.cs line 324 and the hashcode detexted was...

NullReferenceException: Object reference not set to an instance of an object UniLua.BytesLoadInfo.PeekByte () UniLua.LuaState.F_Load (UniLua.LoadParameter& param) UniLua.LuaState.D_RawRunProtected[LoadParameter](UniLua.PFuncDelegate`1 func, UniLua.LoadParameter& ud) UniLua.LuaState.D_PCall[LoadParameter](UniLua.PFuncDelegate`1 func, UniLua.LoadParameter& ud, Int32 oldTopIndex, Int32 errFunc) UniLua.LuaState.UniLua.ILuaAPI.Load (ILoadInfo...

我的工程大部分逻辑都在lua端实现的 里面有很多require文件,今天发现 require的时候手机上崩溃,电脑上不会 查logcat说内存溢出,我大量测试发现 require一个文件内容为Test={},会导致奔溃,而我把require的地方直接换成Test={}。 我更新到最新的unilua也没有,该怎么解决

Hello, UniLua has most of the standard libraries from Lua (they're understandable because it's documentation can be found on lua.org), but the FFI library used in UniLua is quite different...

Hi, unilua中stack 增长的代码,看过之后觉得有一个bug,那就是:程序不能够分配LuaConf.LUAI_MAXSTACK的栈大小空间。源代码如下: Do.cs: private void D_GrowStack(int n) { int size = Stack.Length; if(size > LuaConf.LUAI_MAXSTACK) D_Throw(ThreadStatus.LUA_ERRERR); ``` int needed = Top.Index + n + LuaDef.EXTRA_STACK; int newsize = 2...

项目里用unilua去调用c#的接口利用NGUI创建UI,但是有的时候,会发生跳转的时候整个工程崩溃的情况,但是利用延迟的方式调用场景跳转(不点击按钮),则没有事。求指教 UnloadTime: 3.072003 ms System memory in use before: 226.7 MB. Receiving unhandled NULL exception Launching bug reporter Obtained 256 stack frames. #0 0x00000004655601 in array_safe_grow #1 0x00000004655abb in array_safe_grow...

请问现在UniLua可以支持C#中的delegate的反射吗?如果C#中的函数参数含有delegate,用ffi的方法可以从lua调用吗? 另外UniLua可以支持泛型吗,比如参数中有Dictionary这样的

如果我要用Unilua操作在Scence中已有的对象,就必须把对象传给Unilua。比如我在scene中有个GameObject a, 那么我用Lua.PushLightUserData(a)把东西push到lua里。 lua 函数是这样: local function DisableButton(a) a:SetActive(false) end 这样是不行的,因为a只是一个LightUserData,实际上是一块内存,没有了GameObject的field和method了。而ffi.lua中没有把new_class_mgr暴露出来,造成虽然我可以创建新的Gameobject,但是没法从内存中还原Gameobject。 看了代码后我在resolve_builder()中加了一行 mod.cls_mgr = cls_mgr 把new_class_mgr暴露了出来,才能使用 obj = UnityEngine.cls_mgr.make_instance('GameObject', a) 这样比较丑陋,但是实现了我想要的功能。 请问还有更好的办法吗?

unit tests should be added to unilua with 100% code coverage , so that one can be assured by the stability of the tests - when the same unit tests...