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