title: Snap to scrollview elements
body: <p>I have a scroll view in Unity3D which has all of my elements in it. It scrolls only horizontally and has multiple child elements in view at any time. Most of the time this will be 6, in some rare occasions it can be 5. The setup is 2 rows of 3 objects</p>
  
  <p>Example:
  <a href="https://i.stack.imgur.com/nw3pN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nw3pN.png" alt="enter image description here"></a></p>
  
  <p>As you can see it's 6(and part of number 7/8) objects most of the time and in rare occasions it can be 5. (towards the end for example)</p>
  
  <p>What I would like is: When dragging objects, it always snaps to 6 centered objects. So when I have 12 objects and the user drags the window a bit, I want it to snap to the closest 6. I used Unity's Scroll Rect window with a horizontal layout group below it to achieve my current result. With the settings below: Where "GameGrid" Is just an empty object with a horizontal layout group on it. Below the game grid, the game tiles are made during runtime.</p>
  
  <p><a href="https://i.stack.imgur.com/T9SAy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T9SAy.png" alt="enter image description here"></a></p>