From 6e1f1afca59de0104022fdf5f56ddaffcdf48561 Mon Sep 17 00:00:00 2001 From: GoShikhar Date: Tue, 14 May 2024 12:49:24 +0530 Subject: [PATCH] Updated with transtions and allowing to change children pivots --- Runtime/Scripts/Layout/ScrollSnapBase.cs | 17 +++++++++++------ Runtime/Scripts/Layout/VerticalScrollSnap.cs | 9 +++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Runtime/Scripts/Layout/ScrollSnapBase.cs b/Runtime/Scripts/Layout/ScrollSnapBase.cs index 3ffcb3b..53fc53e 100644 --- a/Runtime/Scripts/Layout/ScrollSnapBase.cs +++ b/Runtime/Scripts/Layout/ScrollSnapBase.cs @@ -17,7 +17,7 @@ namespace UnityEngine.UI.Extensions internal float _scrollStartPosition; internal float _childSize; private float _childPos, _maskSize; - internal Vector2 _childAnchorPoint; + [SerializeField] internal Vector2 _childAnchorPoint = new Vector2(0.5f, 0); internal ScrollRect _scroll_rect; internal Vector3 _lerp_target; internal bool _lerp; @@ -256,6 +256,11 @@ namespace UnityEngine.UI.Extensions childRect.rotation = _screensContainer.rotation; childRect.localScale = _screensContainer.localScale; childRect.position = _screensContainer.position; + child.GetComponent