Hello, I am creating a Level select that is scrollable vertically only, and the level sets are placed from bottom to top (first level set is on bottom scrollview and last available level set is on start of scrollview).
My goal is to automatically scroll the scrollview to the last unlocked level => I found that this can be done via ScrollTo function. My problem is that the ScrollTo function will find scroll value which is placing desired visualelement to bottom of screen. The problem arises, because I have menu back button placed over level select on bottom part of screen. So I need to add some offset to found scroll position, to remove overlapping between desired visualelement and back button . On attached image you can see described problem, my goal is to have scrollto visualelement above red line.
I’ve already tried:
- create empty visualelement of desired height as child of button, but I am worried, that these objects will have some performance impacts, because from my unity experiences with old ui many objects in scrollview caused spikes (it is possible, that in one scrollview will have maybe 200 level buttons…)
- use the scrollOffset property, but I couldn’t get the required behavior
Is it possible to create this via some easy and elegant solution? Thank you!