-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
Script caching issue #889
Comments
I see now that the properties attribute of the Script just sets up the defaults. This should be made clearer with a comment above like: "defaults, override these from the Canvas" |
Hi, where should this comment display? |
Not sure about the exact wording, but for example in cc.Class({
extends: cc.Component,
// defaults, set visually when attaching this script to the Canvas
properties: {
label: {
default: null,
type: cc.Label
},
text: 'Hello, world!'
},
// use this for initialization
onLoad: function () {
this.label.string = this.text;
},
// called every frame
update: function (dt) {
},
}); |
I think that's ok, thanks. |
Steps to reproduce:
Only after renaming the properties.text to something else (like test) then using this.test will the auto update grab the changes to the string.
The following is the output of the console:
Mac OSX 10.9.5
The text was updated successfully, but these errors were encountered: