Skip to main content

Class ScrollRectAutoScroll

A component that automatically scrolls the ScrollRect smoothly toward a normalized target position.

[RequireComponent(typeof(ScrollRect))]
public class ScrollRectAutoScroll : MonoBehaviour

Inheritance​

Fields​

targetPosition​

The desired scroll position (0 = bottom, 1 = top).

[Tooltip("Target normalized vertical scroll position (0 = bottom, 1 = top).")]
[Range(0, 1)]
public float targetPosition

Field Value​

float