赞
踩
using UnityEngine;
using UnityEngine.UI;
// 修复了在Elastic的模式下,localScale.x或者localScale.y为0时一直计算的Content位置的Bug
public class CustomScrollView : ScrollRect
{
protected override void LateUpdate()
{
if (Mathf.Abs(transform.localScale.y) > 0.01f && Mathf.Abs(transform.localScale.x) > 0.01f)
{
base.LateUpdate();
}
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。