move automatically to item in scroll rect
Hello all,
I have a level system set up as a horizontal scroll rect. It consists of 30 level block elements. I am trying to set up some code to get the scroll rect to automatically move to the unlocked level over time. In essence, I would like the scroll rect to move to the position of the level 3 block in the scroll rect panel, if level 3 is unlocked. I set up a static int variable called levelUnlocked, and I tried changing the local position of the panel to match the position of the level 3 block when statics.levelUnlocked == 3. This doesn't seem to work. Can anyone help with generating this code?
Comment