Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

什么情况会导致“LuaDLL.tolua_pushluatable()”返回false #250

Open
tiannahaha opened this issue Jul 28, 2022 · 0 comments
Open

Comments

@tiannahaha
Copy link

我在主c#类开启了一个lua虚拟机赋值给另一个c#的全局静态变量保存,在另一个c#的不同实例里doFile了不同lua脚本,希望可以通过动态加载脚本至物体上,使得不同lua脚本控制不同游戏对象。
运行发现第一个c#实例可以读lua文件并调用lua函数,第二个c#实例读到了lua文件但是无法获得内部的luaFunction,调试发现是这个函数“LuaDLL.tolua_pushluatable()”返回false导致未获得luaFuction,但是不太清楚有什么原因会造成这样。
是说没有让luastate全局统一,还是游戏对象的生命周期导致一些参数的相互覆盖呢?

不知道问题是否描述清楚
期待回复与探讨,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant