You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drag-Panning breaks when disabling PinchableScrollRect while dragging #1
Set up a PinchableScrollRect in a window that you can show/hide (e.g. gameObject.SetActive()) at the press of a key (e.g. hide it with Esc)
show the window
start dragging around with your mouse to pan. Without releasing the mouse button, press Esc (or whichever key you designated to disabling the GameObject containing the PinchableScrollRect) to close the window
show the window again
dragging to pan doesn't work anymore.
The PinchableScrollRect will remain stuck in this state. If you hold down your mouse button and press Esc again, and then open it again, the first drag-pan will work - but after that it will stop working again.
I checked the code, and I think it has to do with the way that PinchableScrollRect.OnPinchStart and OnPinchEnd call base.OnEndDrag and base.OnBeginDrag respectively. This leads to states where, after releasing the mouse button, ScrollRect.m_Dragging remains true.
Thanks for this awesome component! Except for this behaviour, it works really well and feels great to interact with.
Activity
LokoSoloGames commentedon Oct 15, 2024
Thank you for the report. Will take a look on this.