Hi,
according to lecture “Nested co-routines” in the RPG Core tutorial, when calling a co-routine in another co-routine (nested co-routines) we don’t need to use “StartCoroutine()”, isn’t it?
Thanks in advance and best
Hi,
according to lecture “Nested co-routines” in the RPG Core tutorial, when calling a co-routine in another co-routine (nested co-routines) we don’t need to use “StartCoroutine()”, isn’t it?
Thanks in advance and best
When calling from inside a Coroutine, you want to use the yield return keywords…
IEnumerator A()
{
Debug.Log("This should show 20 seconds before...");
yield return B();
Debug.Log("This statement.");
}
IEnumerator B();
{
yield return new WaitForSeconds(20);
}
void Start()
{
StartCoroutine(A());
}
Thanks for the kind reply.
So, we can summarize saying that
Correct?
Thanks and best!
Jader
That’s correct.