using UnityEngine; using UnityEngine.UI; public class ErrorPopupPNL : MonoBehaviour { public static ErrorPopupPNL Instance { get; private set; } Text _text; private void Awake() { if(Instance == null) { Instance = this; this.gameObject.SetActive(false); } else { Destroy(gameObject); } _text = GetComponentInChildren(); _text.color = Color.black; } public void UpdateErrorMessage(string message) { _text.text = message; } }