protected Transform DeepFindChild(Transform root, string childName)
{
Transform result = null;
result = root.Find(childName);
if (result == null)
{
foreach (Transform trs in root)
{
result = DeepFindChild(trs, childName);
if (result != null)
{
return result;
}
}
}
return result;
}
unity遍历查找孩子节点
最新推荐文章于 2024-11-28 17:35:07 发布