cocos编辑器用lua写控件时候的疑问

cocos版本v2.3.3.0

–自定义控件脚本
local container = {}

function container.CreateCustomNode()
local rootNode = cc.Node:create()
return rootNode
end

function container.GetBaseType()
return ‘Node’
end

function container.DoSomeThing(root, parm)

local parent = root:getParent()
local childstr = ""
local children = parent:getChildren()
if children then
    for k, child in pairs(children) do
        if (child) then
            childstr = childstr.."name = "..child:getName().."\n"
        end
    end
end

end

把自定义控件拖入场景后 想获得父节点的其他子节点信息(container.DoSomeThing(root))

但是 getName 取出来全为空字符串 getTag取出来全为999999 而getPosition则正确

重新描述一下问题 顺便顶下

在 C# 里是怎么调用的?
root:getParent() 正常返回了么?
调用的是哪个节点的 getName, getTag ?
请确认以上信息。