user6720726
user6720726

Reputation: 17

Continuously scrolling UI Unity

So I am working working on something in unity (2d game). I have a list of button (UI) on my scene and I want to implement a scrolling mechanism. What is the best way to go about it? Currently , I can scroll through horizontally because I have added a "scroll rect" to the the canvas holding the buttons as I start the game. However when I try to scroll back (horizontally, it goes beyond the Buttons. Is there a way to make the scrolling continuous such that as I scroll, from the first UI element when I get to the last one and I keep scrolling, it continues with the first element. or what should I do. please let me Know If i should clarify.

Upvotes: 1

Views: 1277

Answers (1)

rustyBucketBay
rustyBucketBay

Reputation: 4561

In the Scroll rect you can set the movement type. I don't think the kind of "infinite scroll" you are asking for is available. For your case, I think that the Use Elastic or Clamped mode to force the content to remain within the bounds of the Scroll Rect should do the work.

In the case of the infinite scroll specifically needed, you would need to ask for that explicitely and show your attempt for more specific help.

Upvotes: 0

Related Questions