using UnityEngine; using TMPro; public class PopUpManager : MonoBehaviour { public static PopUpManager Instance { get; private set; } [SerializeField] private TMP_Text interactionPopUpText; bool isPopUpActive = false; private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); return; } Instance = this; } public void ShowPopUp() { isPopUpActive = true; interactionPopUpText.gameObject.SetActive(true); } public void HidePopUp() { isPopUpActive = false; interactionPopUpText.gameObject.SetActive(false); } public bool IsPopUpActive() { return isPopUpActive; } }