Ejemplo n.º 1
0
 /// <summary>
 /// Append an item to the scroll view, assuming a vertical item layout.
 /// </summary>
 /// <param name="scroll">The scroll view object to operate on.</param>
 /// <param name="contentChild">The child object to append. Must support <see cref="RectTransform"/>
 /// <param name="subtractVerticalScrollBar">Allow for the width of the vertical scroll bar
 /// such that it does not overlap the children's width?</param>
 /// <remarks>
 /// The child is arranged below all the exising child items.
 /// </remarks>
 public static void AppendContentV(this ScrollRect scroll, GameObject contentChild, bool subtractVerticalScrollBar = false)
 {
     if (contentChild != null)
     {
         scroll.AppendContentV(contentChild.GetComponent <RectTransform>(), subtractVerticalScrollBar);
     }
 }