How does inheriting from IEnumerator make the method to behave like a coroutine? This has to be somewhat related to the compiler, right?
IEnumerator Fade()
{
for (float ft = 1f; ft >= 0; ft -= 0.1f)
{
Color c = renderer.material.color;
c.a = ft;
renderer.material.color = c;
yield return null;
}
}