cc.ScrollView resets the scroll position after scene transition

Hello all

I’m using cocos creator v 2.4.9

Scroll the ScrollView to a position vertically then load different scene and come back using cc.director.loadScene.
At this time the ScrollView will reset the position to the top. I tried using setting position manually using setContentPosition() in onLoad and start but it didn’t work.

How to solve this problem?

i have try to setContentPostion as you describe, and it works well, here is my demo:
56667.zip (230.7 KB)
you may show a demo that can reproduce this question.

This is the demo project.
NewProject_3.zip (1.2 MB)

This may be due to using custom scroll view

You can try to modify it, the reason it doesn’t work now is because after you set setContentPostion() in start, it will be reset again in:

1 Like