我使用的cocos2dx的版本为2.2.2,代码里获取Scene编辑器里的按钮的时候出现了问题。
CCNode pFishJoyScene = SceneReader::sharedSceneReader()->createNodeWithSceneFile(“cnm.json”);
this->addChild(pFishJoyScene);
CCComRender container=(CCComRender)pFishJoyScene->getChildByTag(18)->getComponent(“Button_40”);
Button button=(Button*)container->getNode();
结果button得到的不是有效值。
