How do I break out of this while loop which is inside a coroutine? The debug message appears continuously even after the value is reached.
void Start()
{
StartCoroutine(StartFadingIn());
}
IEnumerator StartFadingIn()
{
float i = 0f;
while(i!=1f)
{
Color color = Downward.material.color;
color.a = i;
Downward.material.color = color;
yield return new WaitForSeconds(0.05f);
i = i+0.1f;
Debug.Log("Repeat");
}
}