using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CanvasSet : MonoBehaviour { private void Awake() { gameObject.GetComponent().uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize; gameObject.GetComponent().referenceResolution = new Vector2(GameManager.Instance.x, GameManager.Instance.y); } void Start() { if(GameManager.Instance.Over) { gameObject.GetComponent().matchWidthOrHeight = 1.0f; } else { gameObject.GetComponent().matchWidthOrHeight = 0.0f; } } }