新建了个HelloWorld,无改动,运行卡读取条 具体如图,请问是什么原因,新建的项目,并没有改动任何信息
提示的错误是:TypeError: Cannot set property ‘string’ of null 我从谷歌里截取的
自己顶下~~
上代码呀
cc.Class({
extends: cc.Component,
properties: {
label: {
default: null,
type: cc.Label
},
// defaults, set visually when attaching this script to the Canvas
text: 'Hello, World!'
},
// use this for initialization
onLoad: function () {
this.label.string = this.text;
},
// called every frame
update: function (dt) {
},
});
就是官方的代码呀 没改
label拖了 没用 如图
請問有解了嗎?
我也卡在這裡動不了

