js文件名字报错的问题

‘mgitm2.name’ hides inherited property ‘cc.Component.name’. To make the current property override that implementation, add the override: true attribute please.

Can not declare mgitm2.name, it is already defined in the prototype of mgitm2

刚学习这个软件,求大神解答一下这是什么意思,起什么名字都会这样,十分感谢!!!

1赞

不要定义 name 属性名, 或者把 name 换成别的, 如 theName.

感谢!!