cocos-engine
cocos-engine copied to clipboard
Normal class use ccclass data is not stored。
Cocos Creator version
3.7.1
System information
Mac
Issue description
@ccclass
export class A {
// ...
}
@ccclass
export class B extends Component {
@property(A)
a: A = new A();
}
There will be no error reporting in this way, but if the B component is mounted on the node, the A data will not be serialized and saved.
If you write like this: ccclass("A"), then the data can be stored normally.
If this is by design, then there should be print an error.
Relevant error log output
No response
Steps to reproduce
.
Minimal reproduction project
No response
Yes, referring to the 2.x approach, if it's a ccclass it shouldn't ignore the class name if it doesn't inherit from Component, and should give a warning.