Unfortunately my co routine does not play all the way through. It is supposed to fade an object so it's alpha is 0. However it fades to .039.
{
StartCoroutine(colorlerpin7());
yield return null;
}
public IEnumerator colorlerpin7()
{
float ElapsedTime = 0.0f;
float TotalTime = 1f;
while (ElapsedTime < TotalTime)
{
// fades out atipical
ElapsedTime += Time.deltaTime;
fluidpef.GetComponent<Renderer>().material.color = Color.Lerp(new
Color(1f, 1f, 1f, 1f), new Color(1f, 1f, 1f, 0f), (ElapsedTime /
TotalTime));
yield return null;
}
}