using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class checkSize : MonoBehaviour { public int lg = 1; // Update is called once per frame void Update() { this.GetComponent().sizeDelta = new Vector2(this.GetComponentsInChildren().Length*690/ lg, 450); } }