I have a map in my game! I am using Unity UGUI ScrollRect to move it on the Screen just like in King games that only an area of the map is visible at a time and you can scroll to get to the desired Level.
I want my content which is an Image and Level buttons are child of the map image.
I want my scroll rect to point to the current active level. For Example If I am on Level 30 then on loading the map Level the Content of the scroll rect should be on the portion of the map where Level 30 is.
I can’t find anything regarding managing scrollrect’s content position
I observe you are using a horizontal scroller. You’ll have to calculate your_level’s normalized position [position between 0 and 1] in your scrollRect and then use the ScrollRect’s “horizontalNormalizedPosition” property to set the scrollRect to your desired position.
You can also animate it using a co-routine or an invokeRepeating function.
