IEnumerator FadeIn() { //Debug.Log("fade in"); float i = 0; while (i < .9999f) { float a = vgs.intensity; i = Mathf.Lerp(a, 1f, Time.deltaTime); //print(i); vgs.intensity = i; profile.vignette.settings = vgs; if (i > .9f) { StartCoroutine("FadeOut"); m.FadeIn(); yield break; } yield return(null); } }