Home > other >  Learn the cocos encounter problems for help
Learn the cocos encounter problems for help

Time:09-25

Auto TTFP=(CCLabelTTF *) getChildByTag (1);
Auto CHAR=(CCSprite *) TTFP - & gt; GetChildByTag (1);
CHAR - & gt; SetVisible (false);

Results the CHAR is NULL
Online said every word in the label is elves, why not get to see,,
It is not the vera.ttf??
Beg you big ye

CodePudding user response:

Suggest you go to see the realization of the label, the label is in itself a Sprite, it is through the string rendering into Texture2D texture, again through the texture to generate the Sprite, you again to get through it doesn't make any sense to the child node,
  • Related