I'm not sure why this script isn't working. Is it possible set the position of a ScrollRect in this way? I'm trying to scroll to the top on enable.
Repositioning ScrollRect through code. Bug or wrong method?
Code (CSharp):
- private ScrollRect scrollRect;
- scrollRect = GetComponent<ScrollRect>();
- if (scrollRect == null) {
- }
- }