enumerateChildren won't find my Node

I created ui with cocostudio. Here is the structure:

mainscroll is ScrollView
tmpPanel is Layout
I want to get some of the buttons by:

auto mainWidget = (Layout*)cocostudio::GUIReader::getInstance()->widgetFromJsonFile(fileName);
mainWidget->enumerateChildren("//Level1Btn", [](Node *node)
{
      CCLOG("%s", "found");
});

But it simply does not work. I used this method for other UI’s and it worked.

How about getChildByName<T>(name)

1 Like

Didn’t know this function was released. This is great