In Unity 3D, delay the running of a function for a certain number of seconds.
using System.Collections;
using UnityEngine;
...
void Some_Function()
{
StartCoroutine(Delay_Before_Next_Step(1));
}
IEnumerator Delay_Before_Next_Step(float delay_in_seconds)
{
//yield for X seconds.
yield return new WaitForSeconds(delay_in_seconds);
//do something
}