We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.8.4
All
在Node中声明了两个变量,一个是被@Property注释的变量,一个是普通成员变量
如下图,在instantiate节点前,进行成员变量的修改。instantiate后的结果中,被@Property注释的变量,在克隆体中是新值,而普通成员变量,在克隆体中还是旧值
这看起来是个bug,如果不是Bug,instantiate确实是这样设计的,那在官方文档中应该说明一下
No response
snapshot() { this.isOriginSeed = false this.purchasePrice = 10
this.seedOriginal = instantiate(this.node) console.log(this.seedOriginal) }
The text was updated successfully, but these errors were encountered:
dumganhar
No branches or pull requests
Cocos Creator version
3.8.4
System information
All
Issue description
在Node中声明了两个变量,一个是被@Property注释的变量,一个是普通成员变量
如下图,在instantiate节点前,进行成员变量的修改。instantiate后的结果中,被@Property注释的变量,在克隆体中是新值,而普通成员变量,在克隆体中还是旧值
这看起来是个bug,如果不是Bug,instantiate确实是这样设计的,那在官方文档中应该说明一下
Relevant error log output
No response
Steps to reproduce
snapshot() {
this.isOriginSeed = false
this.purchasePrice = 10
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: