public static List<T> FindChildsComponent<T>(this Transform transform) where T : Component
{
T[] tList = transform.GetComponentsInChildren<T>(true);
List<T> Tlist = new List<T>();
Tlist.AddRange(tList);
return Tlist;
}
public static List<T> FindChildsComponent<T>(this Transform transform) where T : Component
{
List<T> ListT = new List<T>();
List<T> All = new List<T>(transform.GetComponentsInChildren<T>(true));
for (int i = 0; i < All.Count; i++)
{
if (All[i].transform.parent == transform) ListT.Add(All[i]);
}
return ListT;
}