Unity报错:ArgumentException: method return type is incompatible

学习Unity协程的过程中遇到了这样的报错:
ArgumentException: method return type is incompatible
System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at :0)
后面还有很多就不发了,一开始我也没搞明白为什么返回值会出问题,最后发现是把协程挂到ugui按钮上了,换成启动该协程的方法就没问题了。

猜你喜欢

转载自blog.csdn.net/qq_44099570/article/details/129313072