BUG解决Button类不能从UnityEngine.UI中引用

'Button' does not contain a definition for 'onClick' and no accessible extension method 'onClick' accepting a first argument of type 'Button' could be found (are you missing a using directive or an assembly reference?)

一个非常奇葩的问题;突然!!!!!

using UnityEngine.UI;引用不了,灰色提示!

363c6c1962d84d49a0377ea8ff938812.png

8c2b3e7fadc04eef802f645efe765a01.png

然后 Button类不管怎么都不能从UnityEngine.UI中引用,气炸!!!

人家的Button类都是继承自UnityEngine.UI

20b43f957ee5421d9be0a775859c0ff1.png

仔细对工程包含的所有插件排查了一遍!!都没有问题!

网上查了各种教程,什么修改 .Net框架。。。。。

最终原因&#

猜你喜欢

转载自blog.csdn.net/leoysq/article/details/124760715
今日推荐