cocos-engine
cocos-engine copied to clipboard
spine隐藏时调用setAnimation报错
Cocos Creator version
3.8.3
System information
Window 10
Issue description
1.节点一开始active=false,调用setAnimation播放动画,此时会报错
protected onLoad(): void {
this.skeleton.setAnimation(0, 'run', true);
this.skeleton.node.active = true;
console.log(this.skeleton)
}
2.手动调用skeleton初始化,此时不会报错,但动画不会播放
protected onLoad(): void {
if (!this.skeleton._skeleton) {
this.skeleton.__preload()
}
this.skeleton.setAnimation(0, 'run', true);
this.skeleton.node.active = true;
console.log(this.skeleton)
}
Relevant error log output
No response
Steps to reproduce
打开上传的项目,运行scene
场景