GameObject enemy = GameObject.Find("enemy");
public GameObject FindChildRecursive(GameObject parent, string childName) {
foreach(Transform child in parent.transform) {
if(child.name == childName) {
return child.gameObject;
} else {
if(child.childCount > 0) {
GameObject result = FindChildRecursive(child.gameObject, childName);
if(result != null) return result;
}
}
}
return null;
}