using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class PopupNotice : MonoBehaviour { public Text txtTitle; public Text txtDesc; public TextureDownload textureDownload; public bool NOT_IMAGE_HIDE = false; public GameObject panelImage; public void Show(string title, string desc, string pathTexture) { txtTitle.text = title; txtDesc.text = desc; gameObject.SetActive(true); if (pathTexture != string.Empty) { panelImage.gameObject.SetActive(true); textureDownload.Download($"{pathTexture}"); } else { if (NOT_IMAGE_HIDE) panelImage.gameObject.SetActive(false); else textureDownload.Initialized(); } } private void OnDisable() { CancelInvoke(); } }