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