unity scrollrect scroll to item code example
Example 1: unity get scrollbar value
// To get the value of a scrollbar, use below
gameObject.GetComponent<Scrollbar>().value;
Example 2: unity scrollrect init pos
Set Pivot Y of the content to 1
if you want your content align with the top of your scrollrect