|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class ToastUI : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI t_mgs;
|
|
|
|
public void Set(string text)
|
|
{
|
|
gameObject.SetActive(true);
|
|
t_mgs.text = text;
|
|
|
|
if (IsInvoking()) CancelInvoke();
|
|
Invoke("Off", 3f);
|
|
}
|
|
|
|
void Off() { gameObject.SetActive(false); }
|
|
} |