Search Unity

Getting the scroll extents of a ScrollView for centering?

Discussion in 'Immediate Mode GUI (IMGUI)' started by jeremyace, Jun 11, 2008.

  1. jeremyace

    jeremyace

    Joined:
    Oct 12, 2005
    Posts:
    1,661
    I need to auto-center a scroll view, but it seems I cannot get access to the actual calculated max scroll value.

    Obviously that would be for allowing for the end buttons and the width/height of the scroll bar on the opposite axis, but those values don't account for the values I am seeing, and I figure there is some other calcs going on behind the scenes (probably to deal with the scroll thumb expansion?).

    My question is, how can I get the final calculated extents of the scroll pos vector so I can center my view properly?

    Thanks,
    -Jeremy