Closed jpetays closed 3 months ago
I have a three page setup where middle page is the start page.
Above changes were not enough because PageSlider calls SetPage on Start() to set initial page. For this initial call we require always teleport!
Fix SetPage():
public void SetPage(int index, bool forceTeleport = false)
Fix PageSlider:
private IEnumerator Start()
{
_scroller.OnPageChangeStarted.AddListener(PageScroller_PageChangeStarted);
_scroller.OnPageChangeEnded.AddListener(PageScroller_PageChangeEnded);
yield return new WaitForEndOfFrame();
if (_startPageIndex == 0) yield break;
_scroller.SetPage(_startPageIndex, forceTeleport: true);
}
Added in develop. Thanks for your great contributions!
PageScroller.SetPage teleports immediately to requested page but it should animate transition from current page to target page in the same way as using swipe.
I made these changes to make it work for me:
...