using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; using Cysharp.Threading.Tasks; using TMPro; using UnityEngine; using UnityEngine.UI; namespace GameLogic { public class UIHDWmsp : MonoBehaviour { public TextMeshProUGUI m_teamName; public TextMeshProUGUI m_PlayerName; public RawImage m_HeadIcon; public async Task OnInit(string teamName, string playerName, string imgUrl) { m_teamName.text = teamName; m_PlayerName.text = playerName; AsyncImageDownload.Instance.SetAsyncImage(imgUrl, m_HeadIcon); await UniTask.Delay(2000); Destroy(gameObject); } } }