Exemplo n.º 1
0
        Transform[] GeneratePoints(Transform root)
        {
            var points = new System.Collections.Generic.LinkedList <Transform>();

            foreach (var node in root.GetComponentsInChildren <Transform>())
            {
                if (node.childCount == 0 && node != root)
                {
                    points.AddLast(node);
                }
            }
            var result = new Transform[points.Count];

            points.CopyTo(result, 0);
            return(result);
        }
 public void CopyTo(T[] array, int arrayIndex) => linkedList.CopyTo(array, arrayIndex);