using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class FollowUI : MonoBehaviour { public RawImage follow; // Update is called once per frame void Update() { float bl2 = (float)Screen.height / follow.texture.height; this.GetComponent().sizeDelta = new Vector2(follow.texture.width, this.GetComponent().texture.height); this.transform.localScale = new Vector3(bl2, bl2, bl2); } }