Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity making a coroutine wait until another coroutine is done

void Start() {
    StartCoroutine(Coroutine2());
}

IEnumerator Coroutine2() {
    yield return Coroutine1();

    //Coroutine1 is now finished and you can use its result
}
IEnumerator Coroutine1() {
    //create your lists then call yield return
    yield return null;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unity #making #coroutine #wait #coroutine
ADD COMMENT
Topic
Name
2+9 =