public static void ScrollChildInView(this ScrollRect sr, GameObject child, Rect viewRect) { if (sr && child) { sr.ScrollChildInView((RectTransform)child.transform, viewRect); } }
public static void ScrollChildInView(this ScrollRect sr, RectTransform childRtx, Rect viewRect) { if (sr && childRtx) { sr.ScrollChildInView(childRtx.position, childRtx.rect.size, childRtx.pivot, viewRect); } }