using UnityEngine;
using System.Collections;
public class UISetup_ReloadTextView : MonoBehaviour {
private int ChildCounts, NewYPosition;
private Transform CurrentChild;
public void UpdateView(){
ChildCounts = transform.childCount;
NewYPosition = 0;
GetComponent<UIScrollView>().ResetPosition();
for(int looper1 = 0; looper1 < ChildCounts; looper1 ++){
CurrentChild = transform.GetChild(looper1);
CurrentChild
.position = new Vector3
(CurrentChild
.position.x, NewYPosition,
0); NewYPosition -= (int)(CurrentChild.GetComponent<UILabel>().relativeSize.y * CurrentChild.localScale.y);
}
GetComponent<UIScrollView>().ResetPosition();
}
}