private Transform[] allChildrenHelper(List<Transform> children){ foreach (Transform child in Children) { children.Add(child); children = (List<Transform>)children.Concat(allChildrenHelper(children)); } return children.ToArray();}/// <summary>/// Gets all children of this game object./// </summary>public Transform[] AllChildren => allChildrenHelper(new List<Transform>());