using UnityEngine;
using UnityEngine.UI;

[RequireComponent(typeof(CanvasScaler))]
public sealed class CanvasFitter : MonoBehaviour {

    [SerializeField]
    private CanvasScaler canvasScaler = default;

    void Awake(){
        if(ScreenExtensions.IsNarrowScreen()){
            canvasScaler.matchWidthOrHeight = 0.0f;
        }
    }
}
