Add a scroll rect then add a panel for container and make that panel the scroll rect to control.
Then the container gets a Horizontal/VerticalLayoutGroup. Add all of your images and set the container size so they show properly.
Run the game, you should be able to scroll them appropriately (make sure you constrain the movement hor/vert so it moves correctly).
private int currentIndex = 0;
[SerializeField] private float imageSize;
[SerializeField] private RectTransform panel;
[SerializeField] private float frequency;
void Start()
{
InvokeRepeating("IncreaseCurrentIndex", frequency,frequency);
}
private void IncreaseCurrentIndex()
{
if(++this.currentIndex >= this.imageCount){ this.currentIndex = 0; }
}
void MoveToNextItem()
{
float targetX = (float)this.currentIndex * this.imageSize;
Vector2 delta = this.panel.anchoredPosition;
delta.x = Mathf.MoveTowards(delta.x, targetX, Time.deltaTime * speed);
this.panel.anchoredPosition = delta;
}
First you give the size of the image in the inspector. The panel is the container for all the images. I guess the rest is self explanatory.
The code is as simple as possible, it could benefit more flexibility but at least it should go as is.
NOTE: This is meant to be for horizontal scrolling. You would change the x for y in the update for vertical scrolling. Also, it uses Mathf.MoveTowards, you could use lerp instead of the velocity of scroll rect.