Does anyone know why this doesn’t work? i’m try to call this coroutine and wait for it to finish but it errors out instead.
Void OnMouseClick() {
Yield return StartCoroutine(myfunction());
}
Does anyone know why this doesn’t work? i’m try to call this coroutine and wait for it to finish but it errors out instead.
Void OnMouseClick() {
Yield return StartCoroutine(myfunction());
}
Your Coroutine should have a return type of IEnumerator and not void. Also there are case issues with the kwywords like yield Code should be:
IEnumerator OnMouseClick() {
yield return StartCoroutine(myfunction());
}