12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- using UnityEngine.UI;
- public class UIBG : MonoBehaviour
- {
- // Start is called before the first frame update
- void Awake()
- {
- }
- // Update is called once per frame
- void Update()
- {
- float bl = (float)Screen.width / 1920f;
- float bl2 = (float)Screen.height / 1080f;
- if (GetTexture2D.urlbase.Contains("329"))
- {
- bl = (float)Screen.width / 5760f;
- bl2 = (float)Screen.width / 1620f;
- }
- if(bl>bl2)
- {
- this.transform.localScale = new Vector3(bl2,bl2,bl2);
- }else
- {
- this.transform.localScale = new Vector3(bl, bl, bl);
- }
- }
- public void gotomain()
- {
- GetTexture2D.urlbase = "169blue";
- SceneManager.LoadScene(0);
- }
- }
|