unity get scrollbar value

Code Example - unity get scrollbar value

                
                        // To get the value of a scrollbar, use below
gameObject.GetComponent<Scrollbar>().value;