Helpers for ScrollRect.
ScrollRect
Moves content so a child sits at the content origin, plus an optional offset. Calls Canvas.ForceUpdateCanvases() first.
Canvas.ForceUpdateCanvases()
using Mane.Unity.UI; using UnityEngine.UI; scroll.SnapTo(row.transform); scroll.SnapTo(row.transform, new Vector2(0f, 12f)); scroll.SnapXTo(row.transform, 8f); scroll.SnapYTo(row.transform);
SnapTo keeps the current position on axes that are not enabled (horizontal / vertical). SnapXTo / SnapYTo only write that axis.
SnapTo
horizontal
vertical
SnapXTo
SnapYTo
There was an error while loading. Please reload this page.