using System.Collections; using System.Collections.Generic; using UnityEngine; namespace NeonTea.Quakeball.Util { public static class TransformUtil { public static Transform FindChildWithName(Transform t, string name) { if (t.name == name) { return t; } for (int i = 0; i < t.childCount; i++) { Transform child = FindChildWithName(t.GetChild(i), name); if (child != null) { return child; } } return null; } } }