destroy in few seconds unity code example
Example 1: how to destroy a gameobject after a sertain amount of seconds
Destroy(objReference, timerInSeconds);
Example 2: unity destroy gameobject with delay
[SerializeField] GameObject MyGreatObject;
//Choose MyGreatObject in the inspector
Destroy (MyGreatObject, 5);