BGTipCheck.cs 514 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. [ExecuteInEditMode]
  6. public class BGTipCheck : MonoBehaviour
  7. {
  8. // Update is called once per frame
  9. void Update()
  10. {
  11. float bl2 = (float)Screen.width / 430f;
  12. float bz = Screen.height / ((847f * bl2 ));
  13. if (bz <1f)
  14. {
  15. float js = ((847f));
  16. bl2 = Screen.height / js;
  17. }
  18. this.transform.localScale = new Vector3(bl2, bl2, bl2);
  19. }
  20. }