Implement image tiles in the horizontal scroller

Hi Everybody,
I’m writing a game and have a requirement to show image tiles horizontally that the user can touch and swipe his finger to go to the next or previous image tiles.

For you guys to understand it clearly, I have also attached a reference image that can help you what I really want? Please note that this image is showing vertical scroll but I want a horizontal one.
[5109-horizontal+scroller.png|5109]

Thanks in advance :slight_smile:

You’ll have to call GUILayout.BeginArea with a rect that have a fixed y, width and height but a variable x. Draw each thumbnail in that rect (it’s going to be much wider than the screen). The swipe will then modify the x.

That’s just one way to do it.

But it looks like I have to update the “x” upon swipe gesture manually. Isn’t there any default control or container provided by Unity that I can use which can provide us the default horizontal swipe gesture functionality?

Actually, in mobile, whenever we have such horizontal or vertical list, we also have bouncy effects which would be difficult and time consuming if we develop on our own. That’s why, I’m looking for some ready made control that we can use in the mobile platform which can provide bouncy effect.

There is a built-in scroller in unity but you can slide just the hold the scroll bar not the any pixel on the picture like native android-ios apps.So I think the best way is creating your own slider
And my second solution is , join all the pictures in to one picture and change the tile offset value with using touch.deltaposition.
But it will be not so easy to find out which is the current picture that user click.