
This script will hide a gameobject of your choice after waiting 4 seconds.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class simpleTimer : MonoBehaviour
{
public GameObject objectToHide;
void Start ()
{
StartCoroutine(hideObject());
}
public IEnumerator hideObject()
{
yield return new WaitForSeconds(4f);
objectToHide.gameObject.SetActive(false);
}
}