This commit is contained in:
2025-05-13 05:05:49 +03:00
parent a68d9ccb42
commit 235216efe2
606 changed files with 684027 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
using UnityEngine;
using System.Collections;
public class Utils {
public static GameObject FindChildRecursive(GameObject obj, string name){
var child = obj.transform.FindChild (name);
if (child != null) {
return child.gameObject;
}
for(int i = 0; i < obj.transform.childCount; ++i){
var rchild = FindChildRecursive(obj.transform.GetChild(i).gameObject, name);
if(rchild != null){
return rchild.gameObject;
}
}
return null;
}
}