Tuesday, July 7, 2015

Unity tutorial: swipe controlled ScrollRect with items snapping






 When using mobile apps you often see screen with list of items you can list through with finger swipes. Currently I also need such screen for one of my games. First, I searched through internet and found this page at Bitbucket. There is "HorizontalScrollSnap" component, but unfortunately, I did not managed to make it work, so I decided to create my own.

 My target was also to create component, that will work not only horizontally, but also vertically.

 Here is screenshots of component in action.


  Final component is one C# script (about 300 lines of code) and you can use it in your projects if you download it here.

 Here is short video showing how to set up the component and what are its features:





7 comments:

  1. The requested URL (c# script) was not found on the server.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. The link download for the c# script was not found on the server. Please help me.

    ReplyDelete
  4. https://drive.google.com/file/d/0B5PfiFZqQdIWNWd6X0xZZ0gwRW8/view

    ReplyDelete
  5. Hello, its working on my end but I have issue when I am trying to delete the screenshot at runtime then there will be blank space display, so can you please help me to solve this

    ReplyDelete