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.GetComponent().sizeDelta.x,this.GetComponentInChildren().GetComponent().sizeDelta.y); } }