using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class ErrorWindow : MonoBehaviour { [SerializeField] GameObject errorWindow; [SerializeField] TextMeshPro errorMessage; public void displayErrorMessage(string str) { errorMessage.text = str; errorWindow.SetActive(true); //3秒間エラーウインドウ表示 Invoke(nameof(EMsetActiveFalse), 3f); } private void EMsetActiveFalse() { errorWindow.SetActive(false); } }