使用ts开发遇到个警告,不知道该如何处理

警告内容如下:
warn: Can not serialize ‘ParallaxNode.layers’ because the specified type is anonymous, please provide a class name or set the ‘serializable’ attribute of ‘ParallaxNode.layers’ to ‘false’.

大概就是说无法序列化数据,但是我不知道该如何额调整,求大神帮看看。。。代码如下:

加个名字:

@ccclass('ParallaxLayer')
export class ParallaxLayer
...
2赞

多谢多谢,纠结半天了被你一下就解决了,太感谢了