checkSize.cs 331 B

123456789101112
  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. { this.GetComponent<RectTransform>().sizeDelta = new Vector2(this.GetComponentsInChildren<RawImage>().Length*690,450);
  10. }
  11. }