My coroutine looks like this:
{
Texture2D tex1=generateTexture(parameters...);
yield return null;
Texture2D tex2=generateTexture(parameters...);
yield return null;
...
}
The problem is, generateTexure is a very heavy task that can take minutes, and I need it to yield during the steps it takes.
How do I add yields inside that generateTexture method, as if I unrolled the method into the calling coroutine and used yield there?