hello guys, am looking to solve this problem.
using UnityEngine;
using System.Collections;
public class test : MonoBehaviour {
public int i = 0;
// Use this for initialization
void Start()
{ //The Result i want Should be :
while (i < 10) //Method 1 : 0
{ //Method 2 : 1
//???? //Method 1 : 2
StartCoroutine(method1(2f)); //Method 1 : 3
StartCoroutine(method1(3f)); //Method 2 : 4
} //Method 1 : 5
} //Method 2 : 6
//Method 1 : 7
IEnumerator method1(float seconds) //Method 1 : 8
{ //Method 2 : 9
print("Method 1 : " + i++);
yield return new WaitForSeconds(seconds);
}
IEnumerator method2(float seconds)
{
print("Method 1 : " + i++);
yield return new WaitForSeconds(seconds);
}
}