EDIT: Sorry, it was a mistake of mine, the problem is non existent.
I have 2 coroutines, one (parent) calls the other (child). Now, if I do a yield break on the child, it kills it, but it also kills the parent. Any idea of how to stop the yield break from killing the parent? Maybe create some yield instruction that saves
IEnumerator MyParentCoroutine ()
{
yield return StartCoroutine (MyChildCoroutine ());
Debug.Log ($"I want to reach here, but yield break kill this coroutine too");
}
IEnumerator MyChildCoroutine ()
{
yield break;
}
Thanks, I was wrongly led to believe that the code I originally posted wouldn’t reach the Log warning, but it turns out, it does. The child coroutine breaking doesn’t stop the parent one (Thanks god!). I was going nuts as if I was in the twilight zone, because I was sure it shouldn’t break the parent one. Turns out I had some othe error in my code that led me to believe that. Sorry for not cheking this longer before posting.
Thanks Antistone, I didn’t knew that you could call it like that.