So I have an issue with a coroutine that is simply not firing.
IEnumerator EnterMenu()
{
//some other code
Debug.Log ("camera swap");
Debug.Log (ScreenWipe.use == null);
yield return ScreenWipe.use.CrossFade (gameCamera.camera, menuCamera.camera, 2.5f);
Debug.Log ("camera swap finish");
//some other code
}
I call EnterMenu like this and all of the other yields work fine.
StartCoroutine (EnterMenu());
The code for the screen wipe is from this
However, I am using a modified C# version because the JS version was not working. I have modified the CrossFade code shown below:
public IEnumerator CrossFade ( Camera cam1, Camera cam2, float time )
{
Debug.Log("CrossFade() begun");
yield return CrossFade( cam1, cam2, time, null );
}
The issue is, “CrossFade() begun” does not get written to the log. The output looks like this:
camera swap
False
camera swap finish
Any ideas?