Author Topic: UI Scroll Grid .GetPosition()?  (Read 3981 times)

Dover8

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 20
    • View Profile
UI Scroll Grid .GetPosition()?
« on: May 23, 2013, 04:52:08 AM »
I'm working on a scroll grid at the moment and was wondering if there is a method available for getting which item index/gameObject is in the center of the scroll?

I'm also noticing that when I scroll using the mouse that when you reach either end, the final item doesn't move all the way into the middle, but it will if you have click dragged when you release the mouse button? Is there a way to make sure it snaps into the middle when using the mousewheel?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Scroll Grid .GetPosition()?
« Reply #1 on: May 23, 2013, 11:34:34 AM »
It's all just math. UICenterOnChild does it if you need an example.