AkiraPixelWind/Assets/Scripts/Main/UI/UIMgr/UIAutoClose.cs
2022-12-29 18:20:40 +08:00

21 lines
420 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIAutoClose : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
StartCoroutine(AutoClose());
}
IEnumerator AutoClose()
{
yield return 0;
yield return new WaitForSeconds(2.5f);
if(gameObject)
gameObject.SetActive(false);
}
}