CheckSize.cs 409 B

1234567891011121314
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class CheckSize : MonoBehaviour
  6. {
  7. // Update is called once per frame
  8. void Update()
  9. {
  10. this.GetComponent<RectTransform>().sizeDelta = new Vector2(this.GetComponent<RectTransform>().sizeDelta.x,this.GetComponentInChildren<Text>().GetComponent<RectTransform>().sizeDelta.y);
  11. }
  12. }