checkSize.cs 359 B

12345678910111213
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class checkSize : MonoBehaviour
  6. {
  7. public int lg = 1;
  8. // Update is called once per frame
  9. void Update()
  10. { this.GetComponent<RectTransform>().sizeDelta = new Vector2(this.GetComponentsInChildren<RawImage>().Length*690/ lg, 450);
  11. }
  12. }