Wait for seconds dose’t work.
void Start(){
WaitForSeconds();
}
IEnumerator WaitForSeconds(){
yield return new WaitForSeconds(2);
print("Posle 5 sekundi"); // Dose't show this
}
Wait for seconds dose’t work.
void Start(){
WaitForSeconds();
}
IEnumerator WaitForSeconds(){
yield return new WaitForSeconds(2);
print("Posle 5 sekundi"); // Dose't show this
}
In Start, use StartCoroutine(WaitForSeconds()). Anytime you call one of your own coroutines, you must use that.