From 0331d960e157e1405767cecb4c2e8911c683c8d7 Mon Sep 17 00:00:00 2001 From: Matthew Prinold Date: Fri, 22 May 2020 10:00:35 +0000 Subject: [PATCH] ScrollConflictManager.cs edited online with Bitbucket now works with scrollsnap Horizontal and calls the appropriate events --- Scripts/Utilities/ScrollConflictManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Scripts/Utilities/ScrollConflictManager.cs b/Scripts/Utilities/ScrollConflictManager.cs index 1462908..cafad08 100644 --- a/Scripts/Utilities/ScrollConflictManager.cs +++ b/Scripts/Utilities/ScrollConflictManager.cs @@ -15,6 +15,7 @@ namespace UnityEngine.UI.Extensions public class ScrollConflictManager : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDragHandler { public ScrollRect ParentScrollRect; + public HorizontalScrollSnap ParentScrollSnapHorizontal; private ScrollRect _myScrollRect; private IBeginDragHandler[] _beginDragHandlers; private IEndDragHandler[] _endDragHandlers; @@ -67,6 +68,7 @@ namespace UnityEngine.UI.Extensions for (int i = 0, length = _beginDragHandlers.Length; i < length; i++) { _beginDragHandlers[i].OnBeginDrag(eventData); + ParentScrollSnapHorizontal.OnBeginDrag(eventData); } } } @@ -78,6 +80,7 @@ namespace UnityEngine.UI.Extensions for (int i = 0, length = _beginDragHandlers.Length; i < length; i++) { _beginDragHandlers[i].OnBeginDrag(eventData); + ParentScrollSnapHorizontal.OnBeginDrag(eventData); } } } @@ -92,6 +95,7 @@ namespace UnityEngine.UI.Extensions for (int i = 0, length = _endDragHandlers.Length; i < length; i++) { _endDragHandlers[i].OnEndDrag(eventData); + ParentScrollSnapHorizontal.OnEndDrag(eventData); } } } @@ -104,6 +108,7 @@ namespace UnityEngine.UI.Extensions for (int i = 0, length = _endDragHandlers.Length; i < length; i++) { _dragHandlers[i].OnDrag(eventData); + ParentScrollSnapHorizontal.OnDrag(eventData); } } }