这个属性为什么要这样定义?
我注释掉以后发现不影响运行,为什么?
cc.Class({
extends: cc.Component,
editor: {
requireComponent: cc.TiledMap
},
这个属性为什么要这样定义?
我注释掉以后发现不影响运行,为什么?
cc.Class({
extends: cc.Component,
editor: {
requireComponent: cc.TiledMap
},
当该节点下没有cc.TiledMap这个组件时,会自动在该节点下挂载(require)这个组件(component),类似于一种组件的依赖关系。
神了, 文档里面没有啊。
好吧,是我自己学艺不精,看得不够仔细