Hi, thanks for you work.
I adding small feature (in my project) "freely scrolling". The essence is simple, add a button (in Editor) that allows or not to freely scroll through screens.
Use case: user can swipe under the last screen and see background (which may not be). If "freely scrolling" enable (true), user can drag screen how them want, else (false) them can swipe only between anchoredPosition.
Feature so small, but so efficient.
- In ScreenSwipe.cs adding field:
[SerializeField]
[Tooltip("(true), user can drag screen how them want, else (false) them can swipe only between anchoredPosition.")]
private bool freelyScrolling;
- In SetContentAnchoredPosition in third condition add:
if (swipeType == SwipeType.Vertical) position.x = content.anchoredPosition.x;
if (swipeType == SwipeType.Horizonal) position.y = content.anchoredPosition.y;
if (position != content.anchoredPosition)
{
if (freelyScrolling) content.anchoredPosition = position;
UpdateBounds();
}
I can create Pull Request or you can make changes yourself. Anyway let me know about you decision.