unity coroutine ienumerator code example
Example 1: how to start a coroutine in c#
void Start()
{
StartCoroutine(Test());
}
IEnumerator Test()
{
yield return new WaitForSeconds[2];
}
Example 2: coroutine start unity
IEnumerator Start()
{
Debug.Log("Start1");
yield return new WaitForSeconds(2.5f);
Debug.Log("Start2");
}