Is there snapping for Scroll view rect?

Hi,

I need to to have my scroll view to snap on elements that is in a panel that is in it’s cotainer. I’ve Googled and found some solutions that I could not apply to my game. But more interestingly I was wondering if there is a snapping element in Unity’s new UI.

Thanks

You should absolutely being using UI. GUI is legacy except for editor scripting. I wish Unity would put this up in big bold letters somewhere so I could stop repeating it every day.

There is always a mathematical solution. I’ve lost familiarity with GUI stuff, but I’m fairly confident it can be done with GUI too. You’d determine the pixel or percentage intervals at which snapping would occur, measure the current position property of the component / element, round it to the nearest snap interval, then write that rounded position to the property.