예제 #1
0
 /// <summary>
 /// Vertically align the ScrollRect to a RectTransform without scrolling past the edge of the content
 /// <param name="alignment"> 0 = bottom aligned, 1 = top aligned</param>
 /// </summary>
 public static void VerticallyAlign(this ScrollRect scrollRect, RectTransform targetRectTransform, float alignment)
 {
     scrollRect.verticalNormalizedPosition = scrollRect.CalculateVerticalNormalizedPosition(targetRectTransform, alignment);
 }