local child = _node:getChildByName(_name)
-- print("find" .. _name .. "in" .. _node:getName())
if child then
return child
else
local children = _node:getChildren()
for i=1, #children do
child = ToolKit:getOnlyChildByName(children[i], _name)
if child then
return child
end
end
return nil
end
-- print("find" .. _name .. "in" .. _node:getName())
if child then
return child
else
local children = _node:getChildren()
for i=1, #children do
child = ToolKit:getOnlyChildByName(children[i], _name)
if child then
return child
end
end
return nil
end