-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
lua 调用 c# delegate 报错 #49
Comments
delegate可以用'+'么?我以为只有event可以那样写。 |
ws.OnOpen = ws.OnOpen + function() end 另外,你那个delegate要加CSharpCallLua |
其实在教程都有,最好去看看 |
不好意思,教程里面我看歪了。 |
教程里面中的是ok的,但是这个是说 on a nil value,已经在delegate中加入CSharpCallLua,而且我调用ws.IsOpen的bool值不会有问题 |
你要先判空,空的话直接OnOpen=function。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我在拿第三方的一个besthttp做了一些调用使用测试,有些疑问,请教一下:
这个是c# code
这个是lua code
结果如下:
如果我在update中一直打印:ws.IsOpen,是看得出他在调用链接,最后返回链接上的,但是调用delegate就报错了,是否是我使用者的问题?
The text was updated successfully, but these errors were encountered: