在 Domemap中 实例中
_root =static_cast(cocostudio::GUIReader::getInstance()->widgetFromJsonFile("UiMap_1.json"));
m_pUILayer->addChild(_root);
//build buuton on map root
Layout *buton_layout 1= static_cast(Helper::seekWidgetByName(_root,"button_Panel"));
如果换成
Layout *buton_layout2 = static_cast(_root->getChildByName("button_Panel"));
为什么buton_layout1有值 ,但buton_layout2没值呢 ,getChildByName方法不是取子对象吗
但Text* alert_lable =dynamic_cast(alert_panel->getChildByName("alert_Label"));是对的