Newer
Older
Plot_On_Reality / Assets / Originals / Scripts / General / ErrorWindow.cs
t-nagao on 1 Feb 2023 530 bytes first
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);
    }
}