22 lines
502 B
C#
22 lines
502 B
C#
using UnityEngine;
|
|
|
|
namespace XED.Util
|
|
{
|
|
public static class UtilityFunction
|
|
{
|
|
public static Transform FindDeepChild(Transform parent, string name)
|
|
{
|
|
foreach (Transform child in parent)
|
|
{
|
|
if (child.name == name)
|
|
return child;
|
|
|
|
Transform result = FindDeepChild(child, name);
|
|
if (result != null)
|
|
return result;
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|