Unity|Unity UGUI ScrollView滑动到指定位置

using UnityEngine; using UnityEngine.UI; public class Test : MonoBehaviour { private ScrollRect sc; private void Start() { sc = GetComponent(); }/// /// 设置Rect位置 /// /// 取值范围0-1 0底部或者最左边1顶部或者最右边 /// 是否设置Vertical public void SetRectPos(float value, bool isvertical) { if(sc) if (isvertical) sc.verticalNormalizedPosition = value; else sc.horizontalNormalizedPosition = value; } }

【Unity|Unity UGUI ScrollView滑动到指定位置】

    推荐阅读