using TMPro; using UnityEngine; public class DownloadFilePrefab : MonoBehaviour { [SerializeField] public TextMeshProUGUI Title; [SerializeField] public TextMeshProUGUI Info; private string URL; private string FileName; private DownloadMod DM; public void FillMe(string title, string info, string url, DownloadMod dm, string fileName = "") { Title.text = title; Info.text = $"Download ({info})"; if (info == "X") { Info.text = "Premium Access"; Title.text = $"Download from {title}"; } URL = url; DM = dm; FileName = fileName; } public void Download() { string Temp = Title.text; if (FileName != "") { Temp = FileName; } DM.DownloadFile(URL, Temp); } }