Update HorizontalScrollSnap.cs
parent
6e1f1afca5
commit
0faa5fc08e
|
@ -17,14 +17,14 @@ namespace UnityEngine.UI.Extensions
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
_isVertical = false;
|
_isVertical = false;
|
||||||
_childAnchorPoint = new Vector2(0, 0.5f);
|
|
||||||
_currentPage = StartingScreen;
|
_currentPage = StartingScreen;
|
||||||
panelDimensions = gameObject.GetComponent<RectTransform>().rect;
|
panelDimensions = gameObject.GetComponent<RectTransform>().rect;
|
||||||
UpdateLayout();
|
UpdateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
|
base.Update();
|
||||||
updated = false;
|
updated = false;
|
||||||
|
|
||||||
if (!_lerp && (_scroll_rect.velocity == Vector2.zero && _scroll_rect.inertia))
|
if (!_lerp && (_scroll_rect.velocity == Vector2.zero && _scroll_rect.inertia))
|
||||||
|
|
Loading…
Reference in New Issue