Hi, rookie question, but In the following code, aren’t we starting coroutine FadeRoutine()
twice? First, when we set currentActiveFade = StartCoroutine(FadeRoutine(target, time));
and then again in the next line yield return currentActiveFade;
public IEnumerator Fade(float target, float time)
{
if (currentActiveFade != null)
{
StopCoroutine(currentActiveFade);
}
currentActiveFade = StartCoroutine(FadeRoutine(target, time));
yield return currentActiveFade;
}