[Unity]报错:‘** Class‘ is missing the class attribute ‘ExtensionOfNativeClass‘! 完美解决方案

Unity报错:’** Class’ is missing the class attribute ‘ExtensionOfNativeClass’!解决方案
这个问题呢,虽然不会影响程序的运行,但是报一个红杠杠也很不舒服,
程序员的天职是啥?不就是无限的解决bug嘛
让我们分析一个这个问题
** Class’ is missing the class attribute 'ExtensionOfNativeClass
翻译:** Class’缺少类属性’ExtensionOfNativeClass

这个就是当我们继承了mono,才会有这些属性,然而没有继承mono, 却被挂到了场景中,直接把脚本在场景中挂载中移除掉就可以了, 就会报一个这样的错误,网上很多说什么重名的,新建文件夹没有关系,这个只是没有继承mono就被挂到对象上了去了确实属性才会报这个错误
 

猜你喜欢

转载自blog.csdn.net/weixin_46472622/article/details/130383224