遍历活跃的子物体
Transform GetTransform(Transform check,string name)
{
foreach(Transform t in check.GetComponentsInChildren<Transform>())
{
if(t.name == name)
{
return t;
}
GetTransform(t,name);
}
return null;
}
遍历活跃的子物体
Transform GetTransform(Transform check,string name)
{
foreach(Transform t in check.GetComponentsInChildren<Transform>())
{
if(t.name == name)
{
return t;
}
GetTransform(t,name);
}
return null;
}