com.unity.uiextensions icon indicating copy to clipboard operation
com.unity.uiextensions copied to clipboard

BUG: ScrollSnap onPageChange event multiple invokes

Open hugoymh opened this issue 1 year ago • 1 comments

Unity UI Extensions Bug Report

Describe the bug

When using ScrollSnap component, the onPageChange C# event tends to invoke multiple times instead of once per page change. Applies when using swipe or buttons to scroll to another page.

Additional context

I'm aware there's an alternative (probably the better one) scroll snapping component which is the ScrollSnapBase component (where HorizontalScrollSnap and VerticalScrollSnap are inheriting from). Said bug is only found in ScrollSnap.

I just came across this problem by accident and the multiple event invoking causes problems when I'm trying to use the event to trigger some Tweening functions for my UI.

Your Setup

  • Operation System: Windows 10
  • Unity Version: 2022.3.45f1
  • Unity UI Extensions Version: 2.3.2

hugoymh avatar Oct 07 '24 10:10 hugoymh

I'll have a look, the ScrollSnap control was a much older control and likely has not received as much attention as the newer HorizontalScrollSnap and VerticalScrollSnap controls. It also has few features.

But I will still have a look and see what can be done.

SimonDarksideJ avatar Oct 15 '24 15:10 SimonDarksideJ