COCOS CREATOR Sets Label content does not display

For novices, there are indeed too many pits,

I thought this.string=”abc”; will do. After setting up, you will find the interface No change at all, even direct settings are invalid.

Correct usage:

var jpmc=cc.find("Canvas/jpmc");
var myLabel = jpmc.getComponent(cc.Label);
myLabel.string="Unfortunately, I did not grab it!";

Why do you do this? It seriously affects the development efficiency. Maybe it is due to other reasons. After a year and a half, it is estimated that you will know why.

For novices, there are indeed too many pits,

I thought this.string=”abc”; Afterwards, you will find that the interface does not change at all, even the direct settings are invalid.

Correct usage:

var jpmc=cc.find("Canvas/jpmc");
var myLabel = jpmc.getComponent(cc.Label);
myLabel.string="Unfortunately, I did not grab it!";

Why do you do this? It seriously affects the development efficiency, maybe For other reasons, first use it for a year or a half, and I’ll probably know why.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3628 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.