using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public static class ScrollHelper { //private static float ScaleFactor; //private static ScrollRect ScrollRect; //private static LayoutGroup LayoutGroup; //private static RectTransform RectTransform; //public static void Locate(this ScrollRect scrollRect, float verticalPos, float horizontalPos) //{ // Vector2 viewSize = scrollRect.viewport.rect.size; // Vector2 contentSize = scrollRect.content.rect.size; // if (viewSize.x >= contentSize.x && viewSize.y >= contentSize.y) // { // return; // } //} //private static void Init(ScrollRect scrollRect) //{ // ScaleFactor = scrollRect.GetComponentInChildren().canvas.scaleFactor; // LayoutGroup = scrollRect.content.GetComponent(); // RectTransform = scrollRect.GetComponent(); //} //private static void CalVertical(float normalizedPos) //{ //} //private static void CalHorizontal() //{ //} }