using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScreenTester : MonoBehaviour { [SerializeField] float timeToDisable = 4; private void OnEnable() { Invoke("disable", timeToDisable); } public void disable() => gameObject.SetActive(false); }