public static Transform GetChild(this Transform transform, string childName) { foreach (var child in transform.GetComponentsInChildren<Transform>()) { if (child.gameObject.name == childName) { return child; } } return null; }